Home > Backend Development > Python Tutorial > How to install python packages

How to install python packages

(*-*)浩
Release: 2019-07-05 11:22:04
Original
13208 people have browsed it

The first basic (source code) installation method

How to install python packages

##1 Download the third-party package and unzip it (recommended learning:

Python video tutorial)

2 Enter cmd in the command prompt, and then use cd to enter the path of the third-party package

3 Enter python setup.py build

4 Enter python setup.py install

You can see the files in the package are being installed...

The second option is to use pip to install

pip is Python's package management system, a command line tool that comes with the Python language.

pip can easily install, uninstall and manage Python packages.


Use pip install module name to install, but you need to have a network, otherwise the installation may fail


Second use whl installation

Sometimes, you will get various errors when using pip to install. At this time, you may need to use whl to install. whl is an offline installation. You need to download the file locally and then proceed. Install. Where can I get the whl file? You can download it from the official website of Python, or from other places. Here I recommend a website for everyone. The resources above are relatively complete. Basically, you can find everything you want, but it is not an official website, so you need to decide whether to use it or not. .

Before using whl, we need to install wheel in python first

pip3 install wheel
Copy after login
Then execute it under the command line

# 打开whl文件所在文件夹
cd C:\Users\Administrator\Documents\Tencent Files\FileRecv(文件夹位置)
# 安装
pip3 install xxx.whl(文件名称)
Copy after login
For more Python related technical articles, please visit

Python Tutorial column to learn!

The above is the detailed content of How to install python packages. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template