Python 第三方库国内镜像下载地址
由于 Python 服务器在国外,因此使用 pip 安装第三方模块或者库的时候,下载速度特别慢,经常出现如下报错:
复制代码
1
2$ socket.timeout: The read operation timed out
为提升下载速度,可以使用国内镜像下载,常用的国内镜像有:
豆瓣
- https://pypi.douban.com/simple
阿里云
- https://mirrors.aliyun.com/pypi/simple
清华大学
- https://pypi.tuna.tsinghua.edu.cn/simple
中国科技大学
- https://pypi.mirrors.ustc.edu.cn/simple
使用方法为在 pip 命令后加 -i URL 方法,以从阿里云下载 pandas 库为例:
复制代码
1
2$ pip install pandas -i https://mirrors.aliyun.com/pypi/simple
在Pycharm中添加镜像源的位置:
最后
以上就是单身星月最近收集整理的关于【资源汇总篇01】Python 第三方库国内镜像下载地址的全部内容,更多相关【资源汇总篇01】Python内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复