I'm trying to change the path from python 2.x to python 3.x, but my system keeps using version 2.x
I have python 3.7 and the latest version of homebrew installed. But my system is just not using the new PATH for version 3.7
My bash_profile is shown below with the last line updated as suggested on https://docs.python-guide.org/starting/install3/osx/
# Setting PATH for Python 3.6
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
export PATH
# Setting PATH for Python 3.6
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
export PATH
# added by Anaconda3 5.0.1 installer
export PATH="/Users/omnidevio/anaconda3/bin:$PATH"
# Setting PATH for Python 2.7
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH
# Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"
export PATH=/usr/local/bin:/usr/local/sbin:$PATH
When I run "python --version" it only shows 2.x
Python 2.7.15
I tried to update pip to version 19, but it uses the old version 10 from python 2.7 using "pip install --upgrade pip" but got the following:
Collecting pip
Using cached
matplotlib 1.3.1 requires nose, which is not installed.
matplotlib 1.3.1 requires tornado, which is not installed.
Installing collected packages: pip
Found existing installation: pip 10.0.1
Uninstalling pip-10.0.1:
Could not install packages due to an EnvironmentError: [Errno 13]
Permission denied: '/Library/Python/2.7/site-packages/pip-10.0.1-
py2.7.egg/EGG-INFO/dependency_links.txt'
Consider using the `--user` option or check the permissions.
You are using pip version 10.0.1, however version 19.0.1 is
available.
You should consider upgrading via the 'pip install --upgrade pip'
command.