I Z
I Z

Reputation: 5927

How can I install an older version of boto on an AWS instance?

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

Upvotes: 2

Views: 2610

Answers (2)

jcomeau_ictx
jcomeau_ictx

Reputation: 38492

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

Upvotes: 0

garnaat
garnaat

Reputation: 45906

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.

Upvotes: 2

Related Questions