M2skills M2skills - 1 year ago 401
MySQL Question

installing mysql connector for python 3 in raspberry pi

I am new at using raspberry pi.
I have a python 3.4 program that connects to a database on hostinger server.
I want to install mysql connector in raspberry pi.I searched a lot but I was not able to find answers . any help would be appreciated

Answer Source

I found no way to install mysql-connector-python that I used with windows. for python 3.4 I used the command

sudo python3 -m pip install pymysql

for python 2.7 you can use following commands

 sudo apt-get install python-mysqldb


sudo apt-get install python-pip
pip install pymysql
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download