我已经创建了一个 Django 项目并且它的工作正常,现在我正在尝试使用 MySql 配置它所以在 Google 中搜索并做了一些方法但是当我 pip install MySQL-python
下面出现问题:
Collecting MySQL-python
Using cached MySQL-python-1.2.5.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-lwubgejh/MySQL-python/setup.py", line 13, in <module>
from setup_posix import get_config
File "/tmp/pip-build-lwubgejh/MySQL-python/setup_posix.py", line 2, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-lwubgejh/MySQL-python/
找不到此错误的任何解决方案:
命令“python setup.py egg_info”在/tmp/pip-build-lwubgejh/MySQL-python/中失败,错误代码为 1
谢谢你的帮助。
最佳答案
此库与 Python 3 不兼容。请遵循 advice in the Django docs并改为安装 mysqlclient。
关于python - pip install MySQL-python 在 Linux 中失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39767586/