Reputation: 79
I'm getting an error after installing MySQL Connector for Python 2.7.9 in Linux OS.
Command /usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-5nxFZ_/mysql-connector-python-rf/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-qLvsiw-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-5nxFZ_/mysql-connector-python-rf
Storing debug log for failure in /home/pi/.pip/pip.log
Searched a lot about this error couldn't find a satisfactory solution, please help me to sort out this error.
Thank you. :)
Upvotes: 2
Views: 3492
Reputation: 27503
use
pip install mysqlclient
as Mysql-Python and all are not supported now. install mysql in linux and install the connector to connect to local mysql
Upvotes: 2
Reputation: 537
if you already installed required systems for python 2.7. Next, You should run this command:
sudo apt-get install python2.7-mysqldb
Upvotes: 1
Reputation: 20137
try this ,
pip install MySQL-python==1.2.5 # version specified
or
pip install MySQL-python
Upvotes: 2