[FIXED] python - pip install mysqlclient on Arch Linux

Issue

I need to use MySQLdb in Python 3.7:

import MySQLdb

this should install through the command pip install mysqlclient which however gives me an error on Arch Linux. It seems prerequisites are missing. I see that on other distributions, like Ubuntu, these can be installed via the command:

sudo apt-get install python-dev default-libmysqlclient-dev

Solutions are available for other distro, but I could not find them for Arch Linux.


Solution

In the end the solution was to install gcc and mysql

pacman -S gcc

pacman -S mysql 

and just later run

pip install mysqlclient


Answered By - Forinstance
Answer Checked By - David Marino (sql.easybugfix Volunteer)

Related Posts

Post a Comment