adopt pip install xxx Errors can be roughly divided into the following categories
The Internet speed is not good
terms of settlement :
The domestic image method is pip install xxx ( Package name ) -i( Image URL )
Common images are :
douban -i https://pypi.douban.com/simple/
Ali -i https://mirrors.aliyun.com/pypi/simple/
Huazhong University of technology -i https://pypi.hustunique.com/simple/
Shandong University of technology -i https://pypi.sdutlinux.org/simple/
University of science and technology of China -i https://pypi.mirrors.ustc.edu.cn/simple/
tsinghua -i https://pypi.tuna.tsinghua.edu.cn/simple
It can be downloaded normally but cannot be installed , Such as
terms of settlement , To find the corresponding wheel file
website :https://www.lfd.uci.edu/~gohlke/pythonlibs/
ctrl+f Search the package name corresponding to the element
Click on the corresponding package
0.1.15 Refers to the version of the Library ,cp37 Is applicable to python3.7,win32 It refers to the corresponding system , If you are linux System , Then go find the corresponding linux package .
And then use it cmd Command line cd To the downloaded directory , use pip Tools for installation , Such as :
pip install pocketsphinx-0.1.15-cp37-cp37m-win_amd64.whl( Press tab Key will automatically complete the package name )
It can be downloaded but the prompt version is incorrect
terms of settlement :
pip install xxx( Package name )==xx.xx( edition )
Able to download , But wrong reporting
Microsoft Visual C++ 14.0 or greater is required.
Get it with "Microsoft C++ Build Tools":
Generally, the downloaded package is .tar.gz The file of , instead of .whl file , First, you need to decompress it , Then compile , then set.up The tool will install it .
This error usually occurs in win System , Because the corresponding... Is missing during compilation C++ Compilation tool failed to compile .
terms of settlement : Let's see if we can find the corresponding wheel file ,wheel A file is a compiled file , It can be installed directly .
If the corresponding file cannot be found , Then download the corresponding C++ Compiler tools ,
Look at this blog : Portal
Python 官網: python https://www.