Python can coexist with multiple versions of the Mac, and there are several Python directories, but in general, it's easy to get a Mac with Python.
Mac system with Python, perhaps the Python version needs to be updated, so the directory structure to understand the
The system's own Python path
The Mac system comes with a program that will be viewed under the library.
Go to Folder/lib (resource pool)
The system's own Python path is:
/library/frameworks/python.framework/versions/2.7
The current version is 2.7.6 directory structure and Windows similarity here next Bin,lib
Bin directory, which is equivalent to the main program's directory
Lib directory, which is the directory of the Python program module
System with Python installation module package path
In the Lib directory python2.7, there is a site-packages this package inside the module are all through
Python setup.py Install
This Python command installs the module
If the system's own Python uses the PIP, or if Easy_install has installed the module, you will see a Python folder in the Lib (repository) directory
For example:
/library/python/2.7/site-packages
In this site-packages, the modules inside this package are all passed
Pip Install xxxxxx
This PIP command installs the module
Python installed by using brew
The MAC has a powerful brew tool, similar to Apt-get, that can be used to install some system modules, and can also update the installation of Python
Reference:
Https://github.com/Homebrew/homebrew/tree/master/share/doc/homebrew#readme
The path that will exist with brew installed:/usr/local
The Python path that is also installed with brew is as follows:
/usr/local/frameworks/python.framework/versions/
Ps:
/usr/local/This folder is equivalent to a local user's system folder