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

1 Answer 1


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

  • In 2024 this gives me Package 'python3-mysql.connector' has no installation candidate.
    – Christian
    Commented Jun 16 at 10:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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