2

Unable to run python 3.7.2

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.

  • What does python3 —version tell you? Also see this link. – agtoever Dec 31 '18 at 16:03
5

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 out brew 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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.