I downloaded and installed Python 3.9 using the Original Installer from python.org, and also tried it with Homebrew after that, which also installed 3.9. However, python3 --version
still tells me I have 3.5.1?
My work computer does not have this issue, so something seems to be pointing the wrong way on my personal machine. 3.5 has reached the end of its life, as Python keeps telling me, so any suggestions are appreciated.
I tried to just restart the terminal but which python3
still pointed to 3.5. After changing the PATH with echo 'export PATH="/usr/local/opt/python@3.9/bin:$PATH"' >> ~/.zshrc
and then also restarting the terminal it worked.
You need to set the path variable to your new version of python installed. Please follow the steps in the link given below: https://www.javatpoint.com/how-to-set-python-path
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.