Search code examples
amazon-ec2botorevert

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


Solution

  • 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.