pip3 install mysql-python failed with error code 1 in /tmp/pip-install-4nev4id4/mysql-python/

前端 未结 2 1708
渐次进展
渐次进展 2020-12-06 08:36

I am new in python on flask, when i try to install mysql-python by entering the
following command in terminal

pip3 install mysql-python
<
相关标签:
2条回答
  • 2020-12-06 09:26

    mysql-python only supports Python 2.x, while you seem to be using Python 3. From the linked PyPI page:

    MySQL-3.23 through 5.5 and Python-2.4 through 2.7 are currently supported. Python-3.0 will be supported in a future release.

    To connect to MySQL from Python 3 you can use other alternatives:

    • mysqlclient
    • mysql-connector-python
    • pymysql
    • cymysql
    0 讨论(0)
  • 2020-12-06 09:36

    MySQL-python does not support python3. That is why you get this particular error

    ModuleNotFoundError: No module named 'ConfigParser'

    In python3 ConfigParser is renamed configparser

    One option to connect to MySQL DB is official python connector

    Another option is pyodbc

    Other options are provided in other answers

    0 讨论(0)
提交回复
热议问题