I've got an error in Python installing MySQL-python

Viewed 15

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?

1 Answers

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/

Related