4

Please see the following stacktrace, is this a permissions issue?

C:\Project\MySQL-python-1.2.3>python setup.py
Traceback (most recent call last):
  File "setup.py", line 15, in <module>
    metadata, options = get_config()
  File "C:\Project\MySQL-python-1.2.3\setup_windows.py", line 7, in get_config
    serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_key'])
WindowsError: [Error 2] The system cannot find the file specified

C:\Project\MySQL-python-1.2.3>

Python version is (ActiveState) 2.7.1

AJ.
  • 27,586
  • 18
  • 84
  • 94

3 Answers3

3

MySQL is a prerequisite, as said in the README of MySQLDb

Fábio Diniz
  • 10,077
  • 3
  • 38
  • 45
1

Same issue here, with same version of Python and MySQL installed (as part of XAMPP). Presumably the pre-requisite is for the "vanilla" MySQL installation and not one included in an *AMP package.

It's not an answer to the problem of installing from the tarball, but binary packages of MySQLdb compatible with ActiveState Python 2.7.1 and Windows 7 are available at this site:-

http://servut.us/akx/2010/09/mysqldb-windows-binaries-python-26-27/

Bill Hoggett
  • 121
  • 1
  • 4
0

Edit the following line in the site.cfg file, part of the mysql-python build directory, to point to your MySQL location.

registry_key = SOFTWARE\MySQL AB\MySQL Server 5.0
Lukas Batteau
  • 2,473
  • 1
  • 24
  • 16