我試圖安裝MySQL-python的在我的virtualenv(Windows 7的32B +的Python 2.7.3),但遺憾的是後命令:中的virtualenv在Windows上安裝MySQL-python的7
pip install MySQL-python
我得到錯誤消息:
Install packages failed: Error occurred when installing package MySQL-python.
The following command was executed:
packaging_tool.py install --build-dir C:\Users\Grzegorz\AppData\Local\Temp\pycharm-packaging3577041299153334552.tmp MySQL-python
The error output of the command:
Downloading/unpacking MySQL-python
Running setup.py egg_info for package MySQL-python
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "C:\Users\Grzegorz\AppData\Local\Temp\pycharm-packaging3577041299153334552.tmp\MySQL-python\setup.py", line 15, in <module>
metadata, options = get_config()
File "setup_windows.py", line 7, in get_config
serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_key'])
WindowsError: [Error 2] Nie można odnaleźć określonego pliku
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "C:\Users\Grzegorz\AppData\Local\Temp\pycharm-packaging3577041299153334552.tmp\MySQL-python\setup.py", line 15, in <module>
metadata, options = get_config()
File "setup_windows.py", line 7, in get_config
serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_key'])
WindowsError: [Error 2] Nie można odnaleźć określonego pliku
----------------------------------------
Command python setup.py egg_info failed with error code 1 in C:\Users\Grzegorz\AppData\Local\Temp\pycharm-packaging3577041299153334552.tmp\MySQL-python
Storing complete log in C:\Users\Grzegorz\pip\pip.log
如果我嘗試從MySQL二進制代碼的Python-1.2.3.win32-py2.7.exe安裝這個包,那麼一切都可以正常安裝,但它不是解決方案適合我。 你有什麼建議如何在Windows 7上正確安裝這個軟件包(我可以毫無問題地安裝所有其他軟件包)?
工程就像一個魅力! 'pip install MySQL-python'命令嘗試從源代碼編譯庫(如果未安裝Visual Studio,將會失敗),而'easy_install MySQL-python'下載預編譯的二進制文件。 – Rockallite