在开发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))
这是虫子吗?
最佳答案
在PIP上打包的方式有一个突出的缺陷。
详情如下:http://bugs.mysql.com/bug.php?id=76063
您可以使用以下命令安装同一链接中提到的mysql连接器:
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
关于python - Python pip安装mysql-connector-python 2.0.1失败,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/27394426/