Home  >  Article  >  Backend Development  >  How to download the library in python

How to download the library in python

藏色散人
藏色散人Original
2019-10-11 16:29:255290browse

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.

How to download the library in python

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:

How to download the library in python

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.

How to download the library in python

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn