The essence of the import module is to import the code inside the module, from top to bottom to execute it again
The order of the modules to find, first from the current directory to find, can not find, then the environment variable inside to find
Standard modules:
Python comes with, do not need to install, direct import can be used
Self-written modules:
Which is the python I wrote.
Third-party modules:
Others have developed good features that need to be installed
Installation method The first type:
This is an operating system command, not executed in the Python command line
Pip Install XXX installs a module
PIP List view installed modules
Pip Uninstall XXX Unload module
Pip this module, in the Python3 inside is Python, the installation of Python can be used directly, but in Python2 there is no this module, you need to manually install to use
Easy_install Requests #这个也是傻瓜式的
The second way, manually installed:
1, first download the installation package, direct Baidu search for example, Python requests module
2. Unpack the installation package
3. Execute Python setup.py install under the extracted directory
Introduction to the Python module