最近,我一直在尝试在Pycharm上设置MySQLDB。我已经安装了Python 3.8.5,并确保设置了路径,一切似乎都很方便。之后,我运行了pip命令。
python -m pip install mysqldb和python -m pip install mysqldb-python
但无济于事。
我试着从Pycharm的解释器页面安装它,但也没有成功。我还尝试使用.whl文件进行安装,但也失败了。在过去的几天里,我到处寻找,我找到了提到这个错误的地方,但我看到的修复都没有真正起作用。无论我尝试安装哪个迭代,得到的错误都是相同的。在我看到的所有指南中,除了我已经做过的事情之外,我从来没有看到任何关于我错过的步骤或在尝试安装之前应该做的事情的提及。错误如下。
ERROR: Could not find a version that satisfies the requirement MySQLdb (from versions: none)
DEPRECATION: The -b/--build/--build-dir/--build-directory option is deprecated. pip 20.3 will remove support for this functionality. A possible replacement is use the TMPDIR/TEMP/TMP environment variable, possibly combined with --no-clean. You can find discussion regarding this at https://github.com/pypa/pip/issues/8333.
ERROR: Could not find a version that satisfies the requirement MySQLdb (from versions: none)
ERROR: No matching distribution found for MySQLdb发布于 2020-10-01 18:49:39
您可以尝试安装以下程序:
pip install pymysql
pip install mysql-connector
pip install mysql-connector-python或者,您可以转到lfd.uci.edu/~gohlke/pythonlibs/#mysql-python并安装轮子。
发布于 2020-09-26 00:17:00
看起来您使用了错误的包,试图通过pip安装mysqldb。我尝试了一下,得到了和你一样的错误,这告诉我pip正在寻找一个要下载和安装的包,但是找不到它。
试着这样做:
pip install MySQL-python您可以在此处了解有关此软件包的更多信息:https://pypi.org/project/MySQL-python/#description
https://stackoverflow.com/questions/64067502
复制相似问题