【问题标题】:pip install MySQL-python failed in linuxpip install MySQL-python 在 linux 中失败
【发布时间】:2016-09-29 10:18:25
【问题描述】:

我已经创建了一个 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/

找不到此错误的任何解决方案: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-lwubgejh/MySQL-python/

谢谢你的帮助。

【问题讨论】:

    标签: python mysql linux django python-3.4


    【解决方案1】:

    此库与 Python 3 不兼容。请按照 advice in the Django docs 安装 mysqlclient。

    【讨论】:

      猜你喜欢
      • 2014-02-23
      • 1970-01-01
      • 2017-09-18
      • 2021-06-28
      • 2020-06-29
      • 1970-01-01
      • 1970-01-01
      • 2019-05-13
      相关资源
      最近更新 更多