使用如下命令出现问题:
pip install https://pypi.tuna.tsinghua.edu.cn/simple 模块名
Cannot unpack file /tmp/pip-WY1nQb-unpack/simple.htm (downloaded from /tmp/pip-0y4s6P-build,
content-type: text/html); cannot detect archive format Cannot determine archive format of /tmp/pip-0y4s6P-build
解决方法
使用命令:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn 模块名
在尝试使用`pip install https://pypi.tuna.tsinghua.edu.cn/simple 模块名`命令时遇到了问题,错误信息表明无法解压文件并检测到档案格式。解决方案是使用带有`--trusted-host`参数的命令:`pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn 模块名`。执行此命令可以解决因源站认证导致的安装失败问题。
2万+

被折叠的 条评论
为什么被折叠?



