简体   繁体   English

为python2.6安装mysqldb时出现问题

[英]problem installing mysqldb for python2.6

My mysql database is located on a remote machine... So i dont have any local copy of mysql on my local machine.. i get the registry key error... (file not found)... 我的mysql数据库位于远程计算机上...因此,我在本地计算机上没有mysql的任何本地副本..我得到了注册表项错误...(未找到文件)...

serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_key'])
WindowsError: [Error 2] The system cannot find the file specified

I think it requires to have a local copy of mysql... How do i install the mysqldb for database residing on another machine??? 我认为它需要具有mysql的本地副本...如何为驻留在另一台计算机上的数据库安装mysqldb?

You will indeed need a local copy of MySQL in order to compile the MySQL extension for Python. 实际上,您确实需要MySQL的本地副本才能为Python编译MySQL扩展。 This page seems to contain a step-by-step guide for Windows. 该页面似乎包含Windows的分步指南。

However, you might have some luck with a pre-compiled MySQL module . 但是,使用预编译的MySQL模块可能会有些运气。 This should work for Python 2.6. 这应该适用于Python 2.6。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM