我正在嘗試連接到資料庫,為此我正在使用 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)
那么為什么我會收到該錯誤訊息?
uj5u.com熱心網友回復:
注意: pip 搜索不起作用,正如錯誤所說 - pip list/search 被濫用并被禁用。您應該手動使用 PyPI 來訪問有關包的資訊 - https://pypi.org/project/mysql-connector-python
至于你的錯誤......它試圖下載mysql-connector-python-2.1.3.tar.gz,而你的點子說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 與 8.0.26。
這意味著您要么使用錯誤的 Python 版本來運行專案,要么內部的某些東西嘗試使用(并下載)一些非常舊的代碼。只是不再托管在該網址上,因此您會收到 404(未找到)。
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/324265.html
