I'm trying to setup and run server through Django, but I can't seem to make Python 3.7.2 replace Python 2.7.14.
1 Answer
Please read the info printed by brew info python
. It also links to the Homebrew website on Python, where it says:
The executables are organized as follows so that Python 2 and Python 3 can both be installed without conflict:
python3
points to Homebrew’s Python 3.x (if installed)python2
points to Homebrew’s Python 2.7.x (if installed)python
points to Homebrew’s Python 2.7.x (if installed) otherwise the macOS system Python. Check outbrew info python
if you wish to add Homebrew’s 3.x python to your PATH.pip3
points to Homebrew’s Python 3.x’s pip (if installed)pip
and pip2 point to Homebrew’s Python 2.7.x’s pip (if installed)
Apparently you have installed both Python 2 and 3 through Hombrew. If you wish for python
to point to Python 3 (instead of 2.7), you have to put /usr/local/opt/python/libexec/bin
in your PATH
before other entries.
python3 —version
tell you? Also see this link.