`
bndis
  • 浏览: 14778 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

python windows mysqldb安装错误解决方法

 
阅读更多

  首先会出现如下错误:
  serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_key']) WindowsError: [Error 2]
  解决方法:
  打开MySQL-python-1.2.3/site.cfg文件,将最后一行的5.0修改为5.1,如下所示:
  registry_key = SOFTWARE\MySQL AB\MySQL Server 5.1
  重新python setup.py build
  出现错误2:
  build\temp.win32-2.6\Release\_mysql.pyd.manifest : general error c1010070: Failed to load and parse the manifest. The system cannot find  the file specified.
  error: command 'mt.exe' failed with exit status 31
  解决方法:
  打开 C:\Python26\Lib\distutils\msvc9compiler.py
  找到这一行 ld_args.append('/MANIFESTFILE:' + temp_manifest)
  然后在下面加入一行 ld_args.append('/MANIFEST')
  重新python setup.py build成功
  最后执行
  python setup.py install
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics