One of the reasons why Python is easy to use and loved by everyone is that many high-quality third-party libraries are one of the reasons.
For example, the requests library we use for crawlers, the pandas library for data analysis, and the sklearn library for machine learning.
But these third-party libraries need to be installed by us. Our usual method is to use the pip install package name, but you will find that the download speed is very slow, sometimes it will report the installation timeout, sometimes it may have to run several times , Wait for a few minutes to install it, this is really engaging mentality.
To speed up the installation of third-party libraries, in fact, we only need to use domestic mirrors, as everyone knows.
The so-called mirror file is actually similar to the ZIP compression package, it makes a specific series of files into a single file in a certain format to facilitate users to download and use. So the download speed of the mirror will be very fast.
The main domestic mirrors are:
Tsinghua: https://pypi.tuna.tsinghua.edu.cn/simple Alibaba Cloud: http://mirrors.aliyun.com/pypi/simple/ University of Science and Technology of China https://pypi.mirrors.ustc.edu.cn/simple/ Huazhong University of Science and Technology: http://pypi.hustunique.com/ Shandong University of Technology: http://pypi.sdutlinux.org/ Douban: http://pypi.douban.com/simple/
If we need to speed up, we only need to add the mirror URL after -i, so that we can experience the fast flying speed.
pip install package name-i https://pypi.tuna.tsinghua.edu.cn/simple
That's it for today's sharing. Have you abandoned your studies?