Python 3 ImportError: No module named 'ConfigParser'

前端 未结 18 2614
半阙折子戏
半阙折子戏 2020-11-22 12:52

I am trying to pip install the MySQL-python package, but I get an ImportError.

Jans-MacBook-Pro:~ jan$ /Library/Framew         


        
18条回答
  •  闹比i
    闹比i (楼主)
    2020-11-22 13:14

    You can instead use the mysqlclient package as a drop-in replacement for MySQL-python. It is a fork of MySQL-python with added support for Python 3.

    I had luck with simply

    pip install mysqlclient
    

    in my python3.4 virtualenv after

    sudo apt-get install python3-dev libmysqlclient-dev
    

    which is obviously specific to ubuntu/debian, but I just wanted to share my success :)

提交回复
热议问题