- 一、ERROR: Cannot determine archive format of xxx
- 二、解决方案
问题:使用pin镜像源下载第三方包时打印如下错误:
ERROR: Cannot unpack file C:UsersxxxAppDataLocalTemppip-unpack-d7k91f69simple.htm (downloaded from C:UsersxxxAppDataLocalTemppip-req-build-i7r7p3x1, content-type: text/html); cannot detect archive format ERROR: Cannot determine archive format of C:UsersxxxAppDataLocalTemppip-req-build-i7r7p3x1二、解决方案
解决方案:添加对镜像源的信任,在安装时采用如下命令:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn package_you_want
举例:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn torchvision