问题描述

从图中可以看到,这个问题是因为访问files.pythonhosted.org超时引起的,换为国内的源就可以解决

这里推荐三个非常不错的国内镜像:
https://pypi.tuna.tsinghua.edu.cn/simple/ 清华大学镜像
http://pypi.douban.com/simple/ 豆瓣镜像
http://mirrors.aliyun.com/pypi/simple/ 阿里镜像

 

方法1:设置pip全局设置镜像源(推荐)

pip3 config --global set global.index-url https://mirrors.aliyun.com/pypi/simple/
pip3 config --global set install.trusted-host mirrors.aliyun.com

方法2:每次安装都指定源

pip3 install SQLAlchemy -i https://pypi.doubanio.com/simple

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐