写在前面
最近在windows下使用pip安装pymysql的时候,出现Cannot unpack file xxx的问题。
问题出现的过程
使用pip安装的时候,起初直接只用如下命令:
pip install pymysql
但是这样直接安装出现的问题是安转速度慢,甚至会出现readtime out问题,于是我使用了清华大学的源。
https://pypi.tuna.tsinghua.edu.cn/simple
安装命令换成如下方式:
pip install https://pypi.tuna.tsinghua.edu.cn/simple pymysql
这样,就出现了开始的问题。Cannot unpack file xxx、
最终的解决方案
最终,我使用如下命令,成功安装。
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn pymysql
又如下提示,表示安装成功