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.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
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:
python3points to Homebrew’s Python 3.x (if installed)
python2points to Homebrew’s Python 2.7.x (if installed)
pythonpoints to Homebrew’s Python 2.7.x (if installed) otherwise the macOS system Python. Check out
brew info pythonif you wish to add Homebrew’s 3.x python to your PATH.
pip3points to Homebrew’s Python 3.x’s pip (if installed)
pipand 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.