由于区域限制,国内用户使用pip下载python库就会特别慢,一些大的包容易超时报错,比如tensorflow
使用国内镜像源来下载会提升下载速度,以tensorflow为例,下其它的包换名即可
清华镜像源:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow
清华的包比较全,但用的人多容易超时报错:
Traceback (most recent call last):
File “C:\Users\xyk\anaconda3\envs\tensorflow\lib\site-packages\pip_vendor\urllib3\response.py”, line 430, in _error_catcher
raise ReadTimeoutError(self._pool, None, “Read timed out.”)
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=‘pypi.tuna.tsinghua.edu.cn’, port=443): Read timed out.
推荐豆瓣镜像源下载tensorflow
pip install tensorflow -i https://pypi.douban.com/simple
实测速度远超清华镜像源
其它的包替换名字即可
————————————————
版权声明:本文为CSDN博主「xuyin1998」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_50775137/article/details/108551903