安裝django出現(xiàn)報(bào)錯:
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 -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
最后成功安裝