Low Orbit Flux Logo 2 F

Failed Building Wheel for MySQL Python

The message: “failed building wheel for mysql python” can occur when trying to install MySQL-Python / MySQLdb using pip. This happens when there are issues with the packages build process or dependencies.

You might need to install headers or dev libraries.

Steps to potentially fix this

On Ubuntu/Debian/Mint, try installing these packages first:

sudo apt-get update
sudo apt-get install python3-dev default-libmysqlclient-dev

On Rhel based systems, install these packages ( might need dnf instead of yum ):

sudo yum install python3-devel mysql-devel

Upgrade pip:

pip install --upgrade pip

Now try installing using one of these commands:

pip install mysql-python    # python2
pip install mysqlclient     # python3