Thursday, February 11, 2010

MySQLdb import setuptools registry key blah

For my nth time reinstalling python and setting up MySQL on a windows machine, i'm back to the same list of errors

ImportError: No module named setuptools

I go find setup tools and install this. Next:

File "setup.py", line 15, in
metadata, options = get_config()
File "C:\Software\MySQL-python-1.2.3c1\setup_windows.py", line 7, in get_confi
g
serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_ke
y'])
WindowsError: [Error 2] The system cannot find the file specified

Gotta love these errors. Completely unintuitive for a relatively tiny and essential package.

The solution???

Give up trying to use the latest release, maybe it's optimised for linux anoraks and use:

http://www.technicalbard.com/files/MySQL-python-1.2.2.win32-py2.6.exe

This installer will sort out everything

1 comment:

  1. I had to install setuptools as well to get past the first error, then I received the same error you list above. I installed pywin32 build 214 thinking it would solve the issue, but I still get the same error message in the cmd prompt (vista32bit, python 2.6.4). When you say "this installer will sort out everything" are you implying that by simply installing pywin32, mysqldb should install fine, or is there more to it that I'm missing?

    ReplyDelete