如何安装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
你需要打开 regedit
,也就是注册表编辑器,然后去找到以下路径:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.7\InstallPath
和 HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.7\InstallPath\InstallGroup
然后把它们改成看起来像这样: HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.7\InstallPath\InstallGroup
。
6
你需要在那个文件里修补注册表键,建议你看看这个讨论帖。
或者你可以下载已经编译好的二进制文件。