簡體   English   中英

Python 3 已安裝且無法安裝 MySQLdb 由於 2.7 deprecation 錯誤

[英]Python 3 installed and unable to install MySQLdb due to 2.7 deprecation error

我已經安裝了 python 3

spiders$ python -V
Python 3.8.5

當我嘗試安裝 MYSQLD 時,我收到以下消息:

spiders$ pip install mysqlclient
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
Collecting mysqlclient
  Using cached mysqlclient-1.4.6.tar.gz (85 kB)
    ERROR: Command errored out with exit status 1:

我看到這可能是由於 Pip 所在的 python 目錄所致。 但我對此非常缺乏教育。 任何幫助表示贊賞。

pip3 install mysql-connector-python修復了它。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM