最近在windows下使用pip安装django的时候,出现Cannot unpack file xxx的问题。
起初使用 **
## pip install django
**
但是这样直接安装出现的问题是安装速度慢,甚至会出现readtime out问题,于是我使用了清华大学的源。
## pip install django-i https://pypi.tuna.tsinghua.edu.cn/simple
出现如下错误:
ERROR: Cannot unpack file C:\Users\yanghu\AppData\Local\Temp\pip-unpack-1435rdl2\simple
(downloaded from C:\Users\yanghu\AppData\Local\Temp\pip-req-build-xdtyf1rv, content-type:
text/html; charset=utf-8); cannot detect archive formatERROR: Cannot determine archive
format of C:\Users\yanghu\AppData\Local\Temp\pip-req-build-xdtyf1rv
解决办法:
pip install -i https://pypi.tuna.tsinghua.edu.cn/
simple --trusted-host pypi.tuna.tsinghua.edu.cn django
安装成功!!!