使用清华、豆瓣镜像源下载tensorflow

由于区域限制,国内用户使用pip下载python库就会特别慢,一些大的包容易超时报错,比如tensorflow
使用国内镜像源来下载会提升下载速度,以tensorflow为例,下其它的包换名即可
清华镜像源:

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple 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

pip install tensorflow -i https://pypi.douban.com/simple
实测速度远超清华镜像源
其它的包替换名字即可

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容