如何安装mysql连接器

时间:2009-11-26 11:46:27

标签: python mysql

我已经下载了mysqlDb,在安装时我收到的错误如下:

C:\Documents and Settings\naresh\Desktop\MySQL-python-1.2.3c1>setup.py build
Traceback (most recent call last):
File "C:\Documents and Settings\naresh\Desktop\MySQL-python-1.2.3c1 
\setup.py",line15,      in  
metadata, options = get_config()
File "C:\Documents and Settings\naresh\Desktop\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] The system cannot find the file specified

我该怎么做才能解决这个问题?

2 个答案:

答案 0 :(得分:6)

注册表项需要在该文件中进行修补,请参考此主题

Integrating MySQL with Python in Windows

或下载预建二进制文件

http://www.codegood.com/archives/4

答案 1 :(得分:0)

您需要启动regedit并制作

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.7\InstallPathHKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.7\InstallPath\InstallGroup

看起来像HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.7\InstallPath\InstallGroup