2012-01-31 148 views
1

我在使用python 2.7版本的Windows環境中運行這個版本,而運行下面會出現錯誤,運行pip install mysql-python for testproject也會給出類似的錯誤。我試過從http://www.codegood.com/archives/4下載並運行安裝程序,但它說Python版本2.6需要,但在註冊表中找不到。有些資源說mysql_config文件丟失了,是這種情況嗎?失敗的pip安裝mysql-python

C:\django\testproject\build\MySQL-python>setup.py build 
Traceback (most recent call last): 
    File "C:\django\testproject\build\MySQL-python\setup.py", line 1 

    metadata, options = get_config() 
    File "C:\django\testproject\build\MySQL-python\setup_windows.py" 
et_config 
    serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, option 
y']) 
WindowsError: [Error 2] The system cannot find the file specified 

回答

0

您是否嘗試過使用可執行安裝?

MySQL-python 1.2.5 MS Windows安裝程序可以找到here,並且很容易成爲windows的最簡單的方法。

*在here中,您有一個sourceforge存儲庫,其中包含用於其他MySQL-python版本的execs,以防無法使用。