我正在尝试连接到一个数据库,为此,我使用mysql-connector。代码是正确的,但我得到以下错误消息:
ERROR: HTTP error 404 while getting https://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-2.1.3.tar.gz如果我使用命令窗口并键入以下内容:
pip search mysql-connector我得到了错误:
ERROR: XMLRPC request failed [code: -32500]
RuntimeError: PyPI's XMLRPC API is currently disabled due to unmanageable load and will be deprecated in the near future. See https://status.python.org/ for more information.我也已经通过使用以下命令安装了mysql-connector:
pip install mysql-connector-python
Requirement already satisfied: mysql-connector-python in c:\users\pf1vmkh9_adm\appdata\local\programs\python\python39\lib\site-packages (8.0.26)
Requirement already satisfied: protobuf>=3.0.0 in c:\users\pf1vmkh9_adm\appdata\local\programs\python\python39\lib\site-packages (from mysql-connector-python) (3.18.1)那么为什么我会收到这个错误消息呢?
发布于 2021-10-19 09:22:51
注意: pip搜索不工作是故意的,正如错误所说- pip列表/搜索被滥用并被禁用。您应该手动使用PyPI来访问有关包的信息- https://pypi.org/project/mysql-connector-python
至于你的错误。它尝试下载mysql-connector-python-2.1.3.tar.gz,而您的pip显示为Requirement already satisfied: mysql-connector-python in c:\users\pf1vmkh9_adm\appdata\local\programs\python\python39\lib\site-packages (8.0.26)。
看看版本: 2.1.3 vs 8.0.26。
这意味着你要么使用了错误的python版本来运行项目,要么里面的某个东西试图使用(并下载)一些非常旧的代码。它只是不再托管在该url,因此您得到404 (未找到)。
https://stackoverflow.com/questions/69628060
复制相似问题