1. 问题处理
当咱们更换镜像源进行pip 安装时,可能会出现报错:ERROR: Cannot determine archive format of :XXXXXXXXXX
好比我刚开始安装tf2.0:python
pip install -i https://pypi.douban.com/simple tensorflow==2.0.0
出现了上面的错误,下面咱们只须要改为以下便可:web
pip install -i https://pypi.douban.com/simple --trusted-host pypi.douban.com tensorflow==2.0.0
经过设置 --trusted-host pypi.douban.com 信任该镜像源。bash
2. 其余经常使用镜像源
阿里云 http://mirrors.aliyun.com/pypi/simple 豆瓣 http://pypi.douban.com/simple 清华大学 https://pypi.tuna.tsinghua.edu.cn/simple 中科大 http://pypi.mirrors.ustc.edu.cn/simple 网易云 https://mirrors.163.com/pypi/simple
当咱们用其余源进行安装时,出现上面问题时。一样能够使用这种解决方法:svg
# 以清华源为例 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn 模块名
3. 更多问题请参考
ubantu系统下更换镜像源(阿里|清华|中科大|网易)spa
pip安装matplotlib.net
本文同步分享在 博客“AI 菌”(CSDN)。
若有侵权,请联系 support@oschina.cn 删除。
本文参与“OSC源创计划”,欢迎正在阅读的你也加入,一块儿分享。code