Upgrade Python on Mac from 2.7 to 3.6 (or newest) for elastic beanstalk client AWS


I'm trying to follow the instructions here but no matter what I do it seems to be stuck on using Python 2.7.1 which is causing me errors currently.


Attached is an image showing my logs of upgrading to the newest awsebccli but its still stuck saying 2.7.1 when it should say 3.6 (or newer)

What could I be doing wrong?

I want to note that I also installed the newest version of python3 and python via brew.

enter image description here

enter image description here

Here is the exact error I'm getting if it helps also.

enter image description here

Show source
| osx   | python   | python-3.x   | installation   | amazon-elastic-beanstalk   2017-01-06 06:01 1 Answers

Answers ( 1 )

  1. 2017-01-06 06:01

    You do not want to upgrade the default python 2.7x installation or the python 3.x installation available on linux or OSX. There are usually lots'f of other libraries and applications that depend on this default installation. When you want to use a specific version of python the approach is to rely on a virtual enviorenment.

    virtualenv is a tool to create isolated Python environments.

    You are then leaving the system installation untouched. Getting the hang of virtualenv is quite easy. Once you create it (a one off task). All you need is to activate it and then you can use it as you would normally use the default python interpreter. How to copy packages from one virtualenv (or the system installation) to another is discussed here:

    Installing python3 in a python2 virtual environment

◀ Go back