1。pip 工具下载其它地址
(1)https://pypi.tuna.tsinghua.edu.cn/simple/
(2)http://pypi.mirrors.ustc.edu.cn/simple/
(3)自带路径https://pypi.python.org/simple
2.异常问题:
C:\Users\TEST-1>pip install mysql-connector https://pypi.tuna.tsinghua.edu.cn/simple/
Collecting https://pypi.tuna.tsinghua.edu.cn/simple/
Using cached https://pypi.tuna.tsinghua.edu.cn/simple/
ERROR: Cannot unpack file C:\Users\TEST-1\AppData\Local\Temp\pip-unpack-8m38ssd9\simple (downloaded from C:\Users\TEST-1\AppData\Local\Temp\pip-req-build-6f33t4vx, content-type: text/html; charset=utf-8); cannot detect archive format
ERROR: Cannot determine archive format of C:\Users\TEST-1\AppData\Local\Temp\pip-req-build-6f33t4vx
解决办法:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua

本文记录了Python中pip安装库遇到的问题及解决方案,包括错误`Cannot unpack file`的处理,IDEA中导入包失败的解决方法,以及安装`mysql-python`时依赖缺失的解决步骤,提供了相关资源链接。
最低0.47元/天 解锁文章
777

被折叠的 条评论
为什么被折叠?



