开发者

Error Installing Python MySQLdb on Windows 7

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


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


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/


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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜