I am trying to install mysqlclient for python, but I always get this error when I try:
$ pip3 install mysqlclient
How can I resolve this issue?
Looking at the error message, it seems that there is an OS Error
, and judging by the terminal layout, you're using Linux.
It seems that to install this package on Linux, there are extra instructions to follow, mentioned on the module's github page:
You may need to install the Python 3 and MySQL development headers and libraries like so:
$ sudo apt-get install python3-dev default-libmysqlclient-dev build-essential
# Debian / Ubuntu% sudo yum install python3-devel mysql-devel
# Red Hat / CentOSThen you can install mysqlclient via pip now:
$ pip install mysqlclient
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With