pip安装包时,解决Cannot unpack file问题


使用豆瓣园安装mysqlclient时,出现Cannot unpack file报错:

> pip install mysqlclient==1.3.12 -index-url https://pypi.douban.com/simple

ERROR: Cannot unpack file C:\Users\songjian\AppData\Local\Temp\pip-unpack-vmrr5ivz\simple.htm (downloaded from C:\Users\songjian\AppData\Local\Temp\pip-req-build-kxphz3oa, content-type: text/html); cannot detect archive format
ERROR: Cannot determine archive format of C:\Users\songjian\AppData\Local\Temp\pip-req-build-kxphz3oa

解决办法:

pip install mysqlclient==1.3.12 -i https://pypi.douban.com/simple --trust -host=pypi.douban.com

其他pip常用国内镜像网站

阿里云:http://mirrors.aliyun.com/pypi/simple/
中国科技大学:https://pypi.mirrors.ustc.edu.cn/simple/
清华大学:https://pypi.tuna.tsinghua.edu.cn/simple/

原文链接:https://blog.csdn.net/weixin_44193978/article/details/105348880


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM