In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how the Python module is always installed failed or slow, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Preface
As we all know, when third-party modules are installed in python, commands are entered into CMD.
1pip install module name
Because the default download module address of python is a foreign website, the download speed of installing python module will be very slow.
It takes half an hour to download a 7mb module, which certainly won't work, and it will appear when you install it.
Time out reported an error
So you can use the domestic mirror source installation.
1 Tsinghua: https://pypi.tuna.tsinghua.edu.cn/simple2 Ali Yun: http://mirrors.aliyun.com/pypi/simple/3 University of Science and Technology of China https://pypi.mirrors.ustc.edu.cn/simple/4 Huazhong University of Science and Technology: http://pypi.hustunique.com/5 Shandong University of Technology: http://pypi.sdutlinux.org/ 6 Douban: http://pypi.douban.com/simple/
Installation commands such as:
1pip install-I https://pypi.doubanio.com/simple/-- trusted-host 2pypi.doubanio.com module name
In this way, the download speed will be very fast.
But
Who remembers such a long website? do you have to find a mirror source website every time you install it?
This is too inconvenient, so we can configure it to use mirror source installation automatically every time pip is installed.
For example:
Although I installed the module in pip instal pyqt5, it is still very fast.
Configuration file
Pip.ini
1 [global] 2timeout = 60003index-url = http://pypi.douban.com/simple4trusted-host = pypi.douban.com
Copying the pip folder in the file to the system's personal directory (C:\ Users\ user name) will solve the problem.
The above is all the contents of the article "what if the Python module always fails to install or is slow?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.