MAC system OSX 10.12 or more
1th Step: Download Python3.5
As follows:
Python3.5
Step Two: Install Python 3.50
Click on the downloaded pkg file for installation and after installation, the default installation path for Python 3.50 is as follows:
Step three: Modify the profile file
Add an alias directly to the. Profile. If your terminal is running a shell that is bash (the default), you can modify ~/.bash_profile and add:
Then restart the terminal or directly
# Setting PATH for Python 3.5
# The original version is saved in. bash_profile.pysave
Export path=$PATH:/library/frameworks/python.framework/versions/3.5/bin:
Alias python= "/library/frameworks/python.framework/versions/3.5/bin/python3. " 5"
Fourth step: Python 2.70 and Python 3.50 switch
Use Python 2.70: note aliaspython= "/library/frameworks/python.framework/versions/3.5/bin/python3. " 5"
Use Python 3.50: Open aliaspython= "/library/frameworks/python.framework/versions/3.5/bin/python3. " 5"
Fifth Step: Verify
Enter Python directly in the terminal to display the version number
MAC Upgrade python2.7 to 3.5