Home > Article > Backend Development > How to download the library in python
How to download the library in python?
pip installation is the simplest mode for installing third-party libraries in Python. To use pip for online installation, we must ensure two basic conditions, which are:
Recommended : "Python Tutorial"
1. The machine to be installed can be connected to the external network
2. Know the name of the third-party library
First look at The first condition is to ensure that it can connect to the external network. The most commonly used one is to ping the Baidu official website, as shown in the figure below, and it will respond normally.
The second condition is to know the name of the python third-party library. For example, if I want to install the Django development module, the installation command is:
pip install Django
As shown in the picture below, pip will automatically download the Django installation package from the default source location and then start the installation:
A prompt will appear after the installation is completed successfully installed, then we open the python command line and try to import the module. If there are no errors in the installation process and the import process is normal, as shown in the second picture below. This means that the third-party module is successfully installed.
The above is the detailed content of How to download the library in python. For more information, please follow other related articles on the PHP Chinese website!