Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Cannot open include file: 'config-win.h': No such file or directory" while installing mysql-python

I'm trying to install mysql-python in a virtualenv using pip on windows. At first, I was getting the same error reported here, but the answer there worked for me too. Now I'm getting this following error:

_mysql.c(34) : Fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory 

If I symlink (Win7) to my regular (not the virtualenv's) python's site-packages/MySQLdb dir I get

Error loading MySQLdb module: No module named _mysql 

I'm rather at a loss here. Any pointers?

like image 546
saturdayplace Avatar asked Dec 29 '09 00:12

saturdayplace


1 Answers

All I had to do was go over to oracle, and download the MySQL Connector C 6.0.2 (newer doesn't work!) and do the typical install.

https://downloads.mysql.com/archives/c-c/

Be sure to include all optional extras (Extra Binaries) via the custom install, without these it did not work for the win64.msi

Once that was done, I went into pycharms, and selected the MySQL-python>=1.2.4 package to install, and it worked great. No need to update any configuration or anything like that. This was the simplest version for me to work through.

Hope it helps

like image 195
Kevin Mansel Avatar answered Oct 05 '22 12:10

Kevin Mansel