pip使用国内镜像安装报错 ERROR: Cannot unpack file C:\U\ww\AppData\Local\Temp\pip-unpack-aqclq0d1\simpl

@[toc](pip使用国内镜像安装报错ERROR: Cannot unpack file C:\Users\12866\AppData\Local\Temp\pip-unpack-c542clcq\simple (downloaded from C:\Users\12866\AppData\Local\Temp\pip-req-build-tsg7kuii, content-type: text/html; charset=utf-8); cannot detect archive format
ERROR: Cannot determine archive format of C:\Users\12866\AppData\Local\Temp\pip-req-build-tsg7kuii
)
今天重新安装python,pip使用国内清华镜像安装opencv-python时发现报错了!!

Cannot unpack file C:\Users\12866\AppData\Local\Temp\pip-unpack-c542clcq\simple (downloaded from C:\Users\12866\AppData\Local\Temp\pip-req-build-tsg7kuii, content-type: text/html; charset=utf-8); cannot detect archive format
ERROR: Cannot determine archive format of C:\Users\12866\AppData\Local\Temp\pip-req-build-tsg7kuii

一翻折腾,发现输入

>pip install i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn  opencv-python==3.4.3.18
Collecting https://pypi.tuna.tsinghua.edu.cn/simple

如果还不行,可以更换国内其他镜像,比如豆瓣

pip install -i http://pypi.douban.com/simple/ --trusted-host=pypi.douban.com/simple包名

即可解决

你可能感兴趣的:(python)