The first basic (source code) installation method
##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.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 firstpip3 install wheel
# 打开whl文件所在文件夹 cd C:\Users\Administrator\Documents\Tencent Files\FileRecv(文件夹位置) # 安装 pip3 install xxx.whl(文件名称)
Python Tutorialcolumn 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!