0

Hello Stackoverflow users,

For my student project i need to use python and mysql, but when i try to use i've this kind of error

Traceback (most recent call last): File "myRFIDserv.py", line 2, in import MySQLdb ImportError: No module named MySQLdb

I 've try to fix this with the installation of python-mysqldb but they have also a error ...

Package python-mysqldb is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'python-mysqldb' has no installation candidate

MySQL-server are already install !

I've try sudo pip install MySQL-python but i have this kind of error

Collecting MySQL-python Using cached MySQL-python-1.2.5.zip Complete output from command python setup.py egg_info: sh: 1: mysql_config: not found Traceback (most recent call last): File "<string>", line 20, in <module> File "/tmp/pip-build-lbb0Fd/MySQL-python/setup.py", line 17, in <module> metadata, options = get_config() File "setup_posix.py", line 43, in get_config libs = mysql_config("libs_r") File "setup_posix.py", line 25, in mysql_config raise EnvironmentError("%s not found" % (mysql_config.path,)) EnvironmentError: mysql_config not found ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-lbb0Fd/MySQL-python 

I don't understand, someone can help me ? ;)

1

1 Answer 1

1

maybe you can try

pip install MySQL-python 
Sign up to request clarification or add additional context in comments.

4 Comments

sudo apt-get install libmysqlclient-dev
they give me that : Reading package lists... Done Building dependency tree Reading state information... Done Package libmysqlclient-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: mysql-server-5.5 libmariadbclient-dev mysql-server-5.1 E: Package 'libmysqlclient-dev' has no installation candidate
thismay help you
try this...this is all I found...

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.