`
zhanyingle_1981
  • 浏览: 320551 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

MySQL-python 安装

 
阅读更多

今晚上光折腾了mysql 和MySQL-python了:

 

下了MySQL-python-1.2.3.tar.gz 解压,运行python setup.py install 结果来了:

Traceback (most recent call last):
  File "setup.py", line 15, in <module>
    metadata, options = get_config()
  File "D:\Jeffrey\Development\Software\MySQL-python-1.2.3\setup_windows.py", li
ne 7, in get_config
    serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_ke
y'])
WindowsError: [Error 2]

 

这个问题应该是在setup_windows.py中无法获取Mysql的安装的key,根据网上的信息改了改:

首先在setup_windows.py里看到:

    serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_key'])
    mysql_root, dummy = _winreg.QueryValueEx(serverKey,'Location')

就是在注册表找不到registry_key,这是在site.cfg里定义的:

registry_key = SOFTWARE\MySQL AB\MySQL Server 5.0,修改了一下site.cfg成:

registry_key = SOFTWARE\MySQL AB\MySQL Server 5.5

还是不行

 

 

 

后来看到http://hi.baidu.com/lettoo/blog/item/6980f086b8223a2b67096ef7.html,还是下了MySQL-python-1.2.3.win32-py2.7.exe,结果我误认为这是包含python27和mysql55的东西,把自己装的都卸载了,晕死!

 

 

全部重新来过,python27,setuptools-0.6c11.win32-py2.7.exe, mysql55, MySQL-python-1.2.3.win32-py2.7.exe, django。

 

终于搞定。。。

 

然后装了wingide-personal-4.1.3-1,试用版,明天试试效果如何

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics