代码之家  ›  专栏  ›  技术社区  ›  sjh

在windows上为django开发设置virtualenv,

  •  4
  • sjh  · 技术社区  · 16 年前

    pip -E <<some virtual env>> install MySQL-python
    

    File "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
    

    1 回复  |  直到 16 年前
        1
  •  5
  •   sjh    16 年前

    # The Windows registry key for MySQL.
    # This has to be set for Windows builds to work.
    # Only change this if you have a different version.
    registry_key = SOFTWARE\MySQL AB\MySQL Server 5.0
    

    我翻了一下注册表,找到了HKEY_LOCAL_MACHINE\SOFTWARE\MySQLAB\,发现我有5.1,

    现在报告另一个错误,但这个问题至少得到了解决;)