-2

I'm using Python 3.10.6 and I' trying to install MySQL-python but it was impossible. I got this error: enter image description here

I tried with pip3 install --upgrade setuptools, pip3 install MySQL-python --use-deprecated=legacy-resolver and pip3 install MySQL-python backtrack-on-build-failures. Nothing worked. Aditional, I created a virtual env "connection", as you can see in the pic, and not worked too.

You have any idea to fix this problem?

phd
  • 82,685
  • 13
  • 120
  • 165
  • https://stackoverflow.com/search?q=%5Bmysql-python%5D+No+module+named+ConfigParser – phd Sep 23 '22 at 04:24

1 Answers1

1

MySQL-python is specifically a python2 library.

You're looking for MySQLdb or PyMySQL.

The one most easily available in pip is PyMySQL, as that is a pure python library.

pip install pymysql will pick it up for you.

https://pypi.org/project/PyMySQL/

Xaraxia
  • 199
  • 9
  • 1
    There is also a pure MySQL library available from Oracle, who now own MySQL, but unless you need some esoteric features it's generally best to stick with the ones I've listed, because the Oracle one has a different API. – Xaraxia Sep 23 '22 at 00:46