

$ cd /Library/Frameworks/amework/Versions/3.9/bin Go to /Library/Frameworks/amework/Versions/3.9/bin directory, list all the files inside the directory, you can see the command file python3 is linked to another executable file python3.9.Library/Frameworks/amework/Versions/3.9/bin:/Library/Frameworks/amework/Versions/2.7/bin.

Run echo $PATH command in a terminal, you can see python 3.9 and python 2.7 ‘s bin directory are all at the beginning of the PATH system environment variable.But how to make python command invokes python 3.7 or python 3.9 instead of python 2.7, you can follow the below steps.To get the current python version, add uppercase -V as the python command parameter like below.Then you can go back to the terminal bash environment again. To exit the Python interactive interpreter, input command exit().Type "help", "copyright", "credits" or "license" for more information. To use the new Python version, you need to run python3 in the terminal.Now when you execute the python command in a terminal, you will find it still uses the old version which is 2.7.

How To Fix Installed Python3 But Still Python 2.7 Is Used Error.
