Reputation: 187
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.
Upvotes: 1
Views: 3688
Reputation: 51
first install then it will work fine.
apt-get install python-dev libmysqlclient-dev
Upvotes: 2
Reputation: 808
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
Upvotes: 0