views:

2732

answers:

6

I'm using Django and Python 2.6, and I want to grow my application using a MySQL backend. Problem is that there isn't a win32 package for MySQLdb on Python 2.6.

Now I'm no hacker, but I thought I might compile it myself using MSVC++9 Express. But I run into a problem that the compiler quickly can't find config_win.h, which I assume is a header file for MySQL so that the MySQLdb package can know what calls it can make into MySQL.

Am I right? And if so, where do I get the header files for MySQL?

+1  A: 

Have you considered using a pre-built stack with Python, MySQL, Apache, etc.?

For example: http://bitnami.org/stack/djangostack

Bill Karwin
+1  A: 

I think that the header files are shipped with MySQL, just make sure you check the appropriate options when installing (I think that sources and headers are under "developer components" in the installation dialog).

Rafał Dowgird
+8  A: 

Thanks all! I found that I hadn't installed the developer components in MySQL. Once that was done the problem was solved and I easily compiled the MySQLdb for Python 2.6.

I've made the package available at my site.

Technical Bard
thanks , trying it now !
hotadvice
+1  A: 

Also see this post on the mysql-python blog: MySQL-python-1.2.3 beta 2 released - dated March 2009. MySQLdb for Python 2.6 is still a work in progress...

Dave Everitt
A: 

Thanks Technical Bard!

Matt
A: 

Thanks Technical Bard! I have been tearing my hair this afternoon tring to get MySQLdb working with 2.6. Cheers, M

Morag