The MAC default installation version is 2.7.X, but the future trend will be python3, because MacOS relies on 2.7 of Python, so you can't change the default Python version. installing Python recommends using homebrew:
Brew Install Python3 installed with terminal operation:
Python//will run the default 2.7 version
Python3//will run the newly installed 3.x version to install the third party package:
PIP//will install the default 2.7 version of the package
PIP3//will install the 3.x version of the package pip after upgrade:
After the PIP upgrade, the version will change:
PIP//will install the 3.x version of the package
To install the version 2.7 package, you can use the following command:
Python-m PIP//will install the 2.7 version of the package recommended artifact: Virtualenv
Virtualenv can be on the Mac virtual a Python running environment, after use or after the wrong package to delete the folder directly can delete the virtual running environment, very convenient. And there's no need to change the native Python environment of the system.
Although Python3 reputation is not good, but the future trend will not change, Python2 will only be maintained until 2020, I suggest that we still learn python3 mainly, unless the need for the library does not support Python3, or try to avoid the use of python2. Python