We have multiple Ubuntu instances on AWS EC2 with different versions of boto installed. One has 2.2.2, the other 2.8.0. One of our script behaves differently on the two machines, not working on the one with the older boto. I am trying to see if the version difference is the reason for it, or if there is something else going on. So what I want to do is to go back to 2.2.2 on the instance with 2.8.0 to test. How do I install an older version? I tried sudo pip install -U boto 2.2.2 but it gave me Could not find any downloads that satisfy the requirement 2.2.2

有帮助吗?

解决方案

I would use virtualenv. Create a new virtual environment on the instance with 2.8.0 and make sure that you tell virtualenv not to use the system-installed packages. I'm pretty sure that is the default behavior but, just in case:

$ virtualenv --no-site-packages test_old_boto

Once the virtualenv is created:

$ cd test_old_boto
$ source bin/activate

and then install the old version of boto in the virtualenv:

$ pip install boto=2.2.2

and you should the be able to test things out.

其他提示

as Lisa Watanabe correctly answered and for whatever reason deleted, the correct syntax is sudo pip install --upgrade boto==2.2.2 or pip install --user --upgrade boto==2.2.2

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top