I tried to install mysql connector for python on Raspberrypi 3 but It didn't work, I got an error message saying : No distributions found at all for mysql-connector python. I usued the command:

sudo pip install mysql-connector-python --allow-external mysql-connector-python 

I'm using python 2.7.9


I suggest you always use packages from the official Raspbian repositories when possible. They will have been tested and will be compatible with the other installed libraries.

apt-cache search mysql | grep connect shows a number of results.

For Python 2 use.

sudo apt-get install python-mysql.connector

For Python 3 use.

sudo apt-get install python3-mysql.connector

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.