python-3.x - 找不到任何满足 mysql-connector-python 要求的下载

标签 python-3.x virtualenv mysql-connector-python

我正在尝试安装 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/

相关文章:

python - 比较列表中的相邻变量并重新格式化输入

python - 为什么这种构建一组链会导致 Celery 出现异常?

python3 使用指定打印机打印横向图像/文件

python - 不能 "activate"virtualenv

python - 我怎样才能摆脱这个从 pip 升级的警告?

python - 故障转移选项在 mysql.connector 中抛出错误

python - Pyright/mypy : "expr" has no attribute "id"

python - OSError : locale. 错误 - 不支持的区域设置

Python:登录无错误

python - 用于 Python 的 MySQL 连接器