我正在尝试安装 mysql-connector-python
我得到以下信息 错误 :
Could not find any downloads that satisfy the requirement mysql-connector-python==2.0.4 (from -r requirements.txt (line 2))
Cleaning up...
No distributions at all found for mysql-connector-python==2.0.4 (from -r requirements.txt (line 2))
我遵循的步骤是:
virtualenv -p python3 env/
source env/bin/activate
pip3 install -r requirements.txt --allow-external mysql-connector-python
requirements.txt
包含以下内容:beautifulsoup4==4.4.1
mysql-connector-python==2.0.4
requests==2.9.1
wheel==0.24.0
如何克服这个问题?
最佳答案
如何在没有 pip 的情况下安装 mysql-connector-python
git clone git@github.com:mysql/mysql-connector-python.git
cd mysql-connector-python
python setup.py install
您实际上可以使用
pip freeze
来验证这是否有效。或 pip list
这一点。如果您想安装特定版本,您可以使用 git tag -n
检查可用版本。然后切换到一个,例如git checkout 2.0.4
然后再次运行 setup.py install 。背景
http://bugs.mysql.com/bug.php?id=79811 .
看到你和我有同样的问题后,我决定在 Oracle 端研究这个问题。我注意到在过去的几年里,他们已经收到了多张关于这个的错误票,昨天还有其他人评论了损坏的安装。可悲的是,这些票“不是错误”被关闭了,我们今天在这里,再次链接断开。
更新
根据我的错误票上的回复,这似乎是问题的根源:
PyPI has decided to not allow any longer the externally hosted projects. I had an email about this a few months ago.
关于python-3.x - 找不到任何满足 mysql-connector-python 要求的下载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34509508/