Python pip安装mysql-connector-python 2.0.1失败 - python

在开发Django应用程序时,我使用以下命令来安装MySQL(python3):

(Venv)$ pip3 install mysql-connector-python --allow-external mysql-connector-python

安装成功,并且pip3 freeze > requirements.txt表示已安装mysql-connector-python==2.0.1

但是,在生产环境中,pip3 install -r requirements.txt产生以下错误消息。

Downloading/unpacking mysql-connector-python==2.0.1 (from -r requirements.txt (line 6))
Could not find any downloads that satisfy the requirement mysql-connector-python==2.0.1 (from -r requirements.txt (line 6))

这是错误吗?

python大神给出的解决方案

在PIP上打包的方式存在一个突出的错误。
详细信息如下:http://bugs.mysql.com/bug.php?id=76063

您可以使用以下命令来安装mysql-connector,如在同一链接上所述:

wget https://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-2.0.3.zip
unzip mysql-connector-python-2.0.3.zip
cd mysql-connector-python-2.0.3
python setup.py install