1

I am having following error when I try to run server

django.core.exceptions.ImproperlyConfigured: 
Error loading MySQLdb module: No module named 'MySQLdb'

I tried using pip install mysql-python, but it gave me this errror:

Collecting mysql-python Using cached MySQL-python-1.2.5.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "<string>", line 20, in <module>
  File "/tmp/pip-build-t81ezx2d/mysql-python/setup.py", line 13, in <module>
    from setup_posix import get_config
  File "/tmp/pip-build-t81ezx2d/mysql-python/setup_posix.py", line 2, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'    
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-t81ezx2d/mysql-python

These are the modules I have installed through pip:

alabaster==0.7.6
Babel==2.0
Django==1.8.3
docutils==0.12
Jinja2==2.8
MarkupSafe==0.23
mysql-connector-python==2.0.4
Pygments==2.0.2
pytz==2015.4
six==1.9.0
snowballstemmer==1.2.0
Sphinx==1.3.1
sphinx-rtd-theme==0.1.8

Any help?

Edit: solved the issue using mysqlclient, Mysql-python isn't available for Python 3.

1

2 Answers 2

2

first install then it will work fine. apt-get install python-dev libmysqlclient-dev

Sign up to request clarification or add additional context in comments.

Comments

0

Maybe a capitalization issue?

try this:

pip install MySQL-python

Hopefully that works, but if not, try using

pip search stringToSearchFor

to find the proper package name

1 Comment

Could be this issue due to the fact that I am using python3?

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.