Problems
Python when installing the package, you can use the installation pip, this is very convenient.
But often mounted on the error attached, very annoying.
For example, we want to install this package sci.
#在cmd中输入
pip install sci
The installation process in the following figure, oh, the error, red red: the
solution to
how to do it?
Two approaches.
Method 1: * (not very recommended)
to copy someone else's whl file, or download from the Internet, and then enter the following code by the cmd.
pip install XXX.whl
whl files can be downloaded via this website
https://www.lfd.uci.edu/~gohlke/pythonlibs/
Method 2 :(highly recommended)
This is because we limit the issue of the external network, the download speed is too slow, error.
Use a mirror image of Tsinghua University, can help you quickly download, speed flying. There are some packages, or even a few seconds can handle that.
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
For example, I want to install sci package.
In cmd, enter:
pip install sci -i https://pypi.tuna.tsinghua.edu.cn/simple
#相比原始方法,加上这么一段话-i https://pypi.tuna.tsinghua.edu.cn/simple
, I speak with the facts.
Successful installation! ! !
Remember this site https://mirrors.tuna.tsinghua.edu.cn/help/pypi/
This concludes the article. . .
2020-02-11