pip install安装django出现报错ERROR: Cannot unpack file C:\Users\ADMINI~1\AppData\Local\Temp\pip-unpack-...

安装django出现报错:
pip install.........
ERROR: Cannot unpack file C:\Users\ADMINI~1\AppData\Local\Temp\pip-unpack-5xle3amy\simple.htm (downloaded from C:\Users\ADMINI~1\AppData\Local\Temp\pip-req-build-amuph3gb, content-type: text/html); cannot detect archive format
ERROR: Cannot determine archive format of C:\Users\ADMINI~1\AppData\Local\Temp\pip-req-build-amuph3gb

ERROR: Cannot unpack file C:\Users\ADMINI~1\AppData\Local\Temp\pip-unpack-48iy_qdd\simple.htm (downloaded from C:\Users\ADMINI~1\AppData\Local\Temp\pip-req-build-y89chw92, content-type: text/html); cannot detect archive format
ERROR: Cannot determine archive format of C:\Users\ADMINI~1\AppData\Local\Temp\pip-req-build-y89chw92

pip install安装django出现报错ERROR: Cannot unpack file C:\Users\ADMINI~1\AppData\Local\Temp\pip-unpack-..._第1张图片
image.png

解决方法如下:

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn 加你想要下载的东西

例如我要下载安装Django版本为2.2的

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn django==2.2

最后成功安装


pip install安装django出现报错ERROR: Cannot unpack file C:\Users\ADMINI~1\AppData\Local\Temp\pip-unpack-..._第2张图片
image.png

参考帖子链接:
https://my.oschina.net/u/4373067/blog/4534340

你可能感兴趣的:(pip install安装django出现报错ERROR: Cannot unpack file C:\Users\ADMINI~1\AppData\Local\Temp\pip-unpack-...)