当前位置:   article > 正文

ERROR: Cannot determine archive format of /tmp/pip-req-build-2uc6o_he 解决方案

error: cannot determine archive format of

1. 问题处理

当我们更换镜像源进行pip 安装时,可能会出现报错:ERROR: Cannot determine archive format of :XXXXXXXXXX
比如我刚开始安装tf2.0:

pip install -i https://pypi.douban.com/simple tensorflow==2.0.0
  • 1

出现了上面的错误,下面我们只需要改成如下即可:

pip install -i https://pypi.douban.com/simple --trusted-host pypi.douban.com tensorflow==2.0.0
  • 1

通过设置 --trusted-host pypi.douban.com 信任该镜像源。

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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

当我们用其他源进行安装时,出现上面问题时。同样可以使用这种解决方法:

# 以清华源为例
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn 模块名
  • 1
  • 2

3. 更多问题请参考

清华镜像快速安装各种python库

ubantu系统下更换镜像源(阿里|清华|中科大|网易)

pip安装matplotlib

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/不正经/article/detail/628873
推荐阅读
相关标签
  

闽ICP备14008679号