tags:

views:

442

answers:

3

Hi, I've just installed python 2.6 on my win7 machine. Now I tried to install mysqldb. But when run "python setup.py install"

 C:\MySQL-python-1.2.3c1>python setup.py install
 Traceback (most recent call last):
   File "setup.py", line 15, in <module>
     metadata, options = get_config()
   File "C:\MySQL-python-1.2.3c1\setup_windows.py", line 7, in get_config
     serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,
     options['registry_key'])
 WindowsError: [Error 2] Das System kann die angegebene Datei nicht finden
 (System cannot find the given file)

But which file? Thanks for your help!

A: 
MySQL-python-1.2enter code here.3c1

? This file. Enter code here!

myfreeweb
I think that was just from the StackOverflow edit box (it appears if you press Ctrl-K with nothing selected).
Daniel Roseman
A: 

Are you running from an Administrator Mode command prompt? Also, do you have the MySQL headers available for the compiler to link against?

If you are just an end-user, you will probably find it easier to use a pre-built MySQLdb binary, as compiling in Windows is a pain. Unfortunately the official site still hasn't built against 2.6 yet, but you can download other people's builds. See this question for some links.

bobince
+3  A: 

I have compiled MySQLdb 1.2.3c1 once with python26, you could find it here

S.Mark