Reputation: 16656
I'm trying to run a django project in a Windows machine, but it keeps given me this error:
File "C:\Anaconda\lib\site-packages\django\db\backends\mysql\base.py", line 17, in <module>
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb
The after some google search I found that the mysql-python
library is necessary, for that I'm trying the command: pip install mysql-python
, but keeps given me the following error:
C:\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -Dversion_info=(1,2,5,'fin
al',1) -D__version__=1.2.5 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.0
.2\include" -IC:\Anaconda\include -IC:\Anaconda\PC -c _mysql.c -o build\temp.win
-amd64-2.7\Release\_mysql.o /Zl
gcc.exe: error: /Zl: No such file or directory
error: command 'C:\\Anaconda\\Scripts\\gcc.bat' failed with exit status 1
I'm googling about it but no luck so far. Any idea how to solve this problem ?
--
UPDATE
@iwin, I tried to install what you recommend but this is what I received:
Upvotes: 2
Views: 4908
Reputation: 1043
I ran into the same problem and eventually found the following solution. The only thing that was different from our solutions was that I am using cygwin.
http://www.reddit.com/r/Python/comments/33i99j/does_anyone_know_how_to_install_mysqldb_with/
conda install mysql-python
Upvotes: 1
Reputation: 11
I didnt get mysql-python (mysqldb) work with anaconda (2/3) or python 2.7/3.4 or pip.... Solution see here http://www.manejandodatos.es/2014/02/anaconda-mysql/
Upvotes: 1