Error installing Python MySQLdb on Windows 7

See the following stack: is it 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 (ActiveState) 2.7.1

+4
source share
3 answers

MySQL is a prerequisite as stated in MySQLDb README

+3
source

The same problem here, with the same version of Python and MySQL that is installed (as part of XAMPP). Presumably, the premise is for installing "vanilla" MySQL, and not the one included in the * AMP package.

This is not an answer to the installation problem from tarball, but MySQLdb binary packages compatible with ActiveState Python 2.7.1 and Windows 7 are available on this site: -

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

+1
source

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

 registry_key = SOFTWARE\MySQL AB\MySQL Server 5.0 
0
source

All Articles