You can even run Python3 alongside a concurrent Python 2.7 installation without affecting the version 2.7 installation.
How we can do it?
1. Download the most recent package from the Python website and install latest package on your Mac.
2. Run terminaland write a command:
$ python --version Python 2.7.6 $ python3 --version Python 3.9.6 $ alias python=python3 $ python --version Python 3.9.6 #here your version latest to Python
In regards to deleting the symbolic links Python2.7, I found this to be useful.
find /usr/local/bin -lname '../../../Library/Frameworks/Python.framework/Versions/2.7/*' -delete
Now job done, try write in terminal $ python --version and you should be look Python 3.9.x
Same situation with pip, if you write in terminal $pip list and look $bash
pip: command not found
Open the terminal and write
$ alias pip=pip3 $ pip --version pip 21.1.3 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)
Jobe done and now you can write pip or pip3 - it's same like simlink.
MacOS comes with Python installed. But to make sure that you have Python installed open the terminal and run the following command.
If this command returns a version number that means Python exists. Which also means that you already have access to easy_install considering you are using macOS/OSX. Now, all you have to do is run the following command.
sudo easy_install pip
After that, pip will be installed and you'll be able to use it for installing other packages. For try if pip working well use:
If you want install another modules - you can do this, for example:
pip install regex
sudo pip3 install beautifulsoup4