在配置tensorflow环境时遇到pip3 install tensorflow==2.8.0
指令下载速度非常慢一直安装不上的问题,解决办法是添加镜像。
参考链接:解决pip下载速度太慢
临时添加镜像
国内镜像链接:
清华:https://pypi.tuna.tsinghua.edu.cn/simple
阿里云:http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
华中理工大学:http://pypi.hustunique.com/
山东理工大学:http://pypi.sdutlinux.org/
豆瓣:http://pypi.douban.com/simple/
可以在使用pip3
命令时临时添加镜像源:
pip3 install 包名 -i https://pypi.tuna.tsinghua.edu.cn/simple
使用该命令可能会报错:
ERROR: Cannot unpack file /tmp/pip-unpack-76t19wtc/simple.html (downloaded from /tmp/pip-req-build-gs36wrfk, content-type: text/html); cannot detect archive format
ERROR: Cannot determine archive format of /tmp/pip-req-build-gs36wrfk
如果出现上述错误,使用以下命令:
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn 包名