关于‘pip install’安装时遇到‘time out’问题

如题,在自己实际操作过程中,经常遇到此类问题,

1.如果是因为网络拥堵,可选择修改安装时间限制

pip --default-timeout=100 install <包名>

2.如果在国内镜像网站搜索不到该软件或者包,可以换个镜像网站重新下载。

下面为部分国内可用的镜像网站:


Python官方:https://pypi.python.org/simple

清华大学:https://pypi.tuna.tsinghua.edu.cn/simple

中国科技大学:https://pypi.mirrors.ustc.edu.cn/simple

中国科学院:http://pypi.mirrors.opencas.cn/simple

阿里云:http://mirrors.aliyun.com/pypi/simple

v2ex:http://pypi.v2ex.com/simple

douban:http://pypi.douban.com/simple

使用方法,例如:

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple <包名>

猜你喜欢

转载自blog.csdn.net/qq_45802280/article/details/107306323
今日推荐