2 pieces of articles are referenced:
View python location which python
First back up 1, sudo cp/usr/bin/python/usr/bin/python_cp
Delete 2, sudo rm/usr/bin/python
//The default setting is python3.5,Create a link (I'm just going to find the parser path for my installed Python, and then stitch my own path to execute the following command OK)
3, sudo ln-s/usr/bin/python3. 5/usr/bin/python
url:78017558
The 1.MAC system comes with a python environment in:
Python 2.7.10:/system/library/frameworks/python.framework/version/2.7
Where the interpreter is in this directory./bin/python2.7
Python 2.6.9:/system/library/frameworks/python.framework/version/2.6
Where the interpreter is in this directory./bin/python2.6
2. The default environment for user-installed Python environments is:
Python 3.4.2:/library/frameworks/python.framework/version/3.4
Where the interpreter is in this directory./bin/python3.4
Python 2.7.7:/library/frameworks/python.framework/version/2.7
Where the interpreter is in this directory./bin/python2.7
Url:https://www.cnblogs.com/bahcelor/p/8278711.html
To resolve the issue record:
Ah, it's done. When the Python script starts, it calls the parser to parse our script, which Python seems to be the location to return the parser, and the system uses Python parser from the system by default, so the library can't be quoted. Not your own parser is sure to find your own, and then use
Set up a parser for python2.7 (own Python) to create a link
sudo ln-s/usr/local/bin/pip2.7
Specify parser parsing and then it's OK.
To find a command for the parser path:
which Python
Mac launches scripts at the terminal using the command line and cannot use the python you have installed to perform scripting problems