我试图安装在Windows 7上的python模块“mysql”与安装了AppServ的Apache(安装包括Apache,MySQL和PHP)。
当我尝试运行“python-mysql”的setup.py脚本时,出现错误
serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_key']) WindowsError: [Error 2] The system cannot find the file specified
问题是它无法findMySQL的registry。 所以我打开了regedit并在HKEY_LOCAL_MACHINE下的默认位置(在setup.py中指定) – SOFTWARE\MySQL AB\MySQL Server 5.1下HKEY_LOCAL_MACHINE 。
但是,我发现这个位置在我的电脑上不存在,search了一下之后,我发现在HKEY_USERS下我有SOFTWARE下的“AppServ”,但是MySQL Server没有find的地方!
任何人有这个问题的经验,并知道我应该指出configuration?
谢谢! 乔尔
我手动添加它,并input到“版本”和“位置”(我映射到我的MySQL安装path的bin文件夹)的string值。 然后,您需要使用您在registry中添加这些string的相同键值来更新site.cfg。 这应该阻止其他问题。 由于Python正在用Visual Studio编译,所以我没有编译… grrr。 希望这可以帮助你!