3

I initially installed Elastic Beanstalk (via $ pip install awsebcli) using Python 2. I want to make sure my application will be deployed with Python 3. I tried uninstalling Elastic Beanstalk ($ pip uninstall awsebcli) and reinstalling it, but when I run $ eb -- version I still get EB CLI 3.12.1 (Python 2.7.1).

3
  • How did you reinstall it? Was there errors on uninstalling? Commented Feb 6, 2018 at 21:25
  • 1
    Do you have the program pip2? If yes, does pip2 list show awsebcli installed? If yes, perform pip2 uninstall awsebcli. Perform eb --version now to verify that awsebcli is gone. Commented Feb 7, 2018 at 4:39
  • Same problem.... Commented Mar 4, 2018 at 21:11

1 Answer 1

2

I know this question is a few months old but I thought I'd add a clarified answer since I just encountered this.

The Problem

I was trying to install the awsebcli with the python2 version of pip.

If you run pip --version it'll tell you:

$ pip --version
pip 18.0 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)

The Solution

What you need it to install pip from python3-pip and use the pip3 command.

First of course if you've installed the awsebcli with this pip version you'll want to remove it.

$ pip uninstall awsebcli

Now install the new python3 version of pip:

$ sudo apt-get install python3-pip

This will make the pip3 command available which manages python3 libraries.

$ pip3 --version
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)

Next install the awsebcli with pip3

$ pip3 install awsebcli

Finally check that you've got the right eb version:

$ eb --version
EB CLI 3.14.4 (Python 3.6.5)
Sign up to request clarification or add additional context in comments.

2 Comments

I have pip 19.1.1 from /Users/saadmirza/Desktop/Herolocity/unified/lib/python3.6/site-packages/pip (python 3.6) But still after pip3 install awsebcli I got eb python version 2.7
@SaadMirza, try running which awsebcli (or maybe which eb - it's been a while since I've written this). I suspect you've got it installed in more than one place (i.e. both at the global level and at your user level). If that's the case you need to remove it from the additional location(s) too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.