Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/287.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何安装mysql连接器_Python_Mysql - Fatal编程技术网

Python 如何安装mysql连接器

Python 如何安装mysql连接器,python,mysql,Python,Mysql,我已经下载了mysqlDb,在安装它的过程中,我遇到了如下错误: C:\Documents and Settings\naresh\Desktop\MySQL-python-1.2.3c1>setup.py build Traceback (most recent call last): File "C:\Documents and Settings\naresh\Desktop\MySQL-python-1.2.3c1 \setup.py",line15, in metadat

我已经下载了mysqlDb,在安装它的过程中,我遇到了如下错误:

C:\Documents and Settings\naresh\Desktop\MySQL-python-1.2.3c1>setup.py build Traceback (most recent call last): File "C:\Documents and Settings\naresh\Desktop\MySQL-python-1.2.3c1 \setup.py",line15, in metadata, options = get_config() File "C:\Documents and Settings\naresh\Desktop\MySQL-python-1.2.3c1 \setup_windows.py", line 7, in get_config serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_key']) WindowsError: [Error 2] The system cannot find the file specified C:\Documents and Settings\naresh\Desktop\MySQL-python-1.2.3c1>setup.py build 回溯(最近一次呼叫最后一次): 文件“C:\Documents and Settings\naresh\Desktop\MySQL-python-1.2.3c1 \setup.py“,第15行,英寸 元数据,options=get_config() 文件“C:\Documents and Settings\naresh\Desktop\MySQL-python-1.2.3c1 \设置“windows.py”,第7行,在get\u config中 serverKey=\u winreg.OpenKey(\u winreg.HKEY\u LOCAL\u机器,选项['registry\u key']) WindowsError:[错误2]系统找不到指定的文件
如何解决此问题?

注册表项需要在该文件中进行修补,请参考此线程

或者下载预构建的二进制文件


您需要启动
regedit

HKEY\u LOCAL\u MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.7\InstallPath
HKEY\u LOCAL\u MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.7\InstallPath\InstallGroup


看起来像是HKEY\U LOCAL\U MACHINE\SOFTWARE\Python\PythonCore\2.7\InstallPath\InstallGroup

为我做的。这是
regedit
,所以是YMMV。