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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值