2016-01-24 76 views
0

我在Windows 10上安裝了Python 3.4和wxPython Phoenix。我進入Eclipse並將wxPython添加到項目的外部庫中,但是當我嘗試導入它時,出現此錯誤:wxPython導入Windows安裝錯誤

Traceback (most recent call last): 
    File "C:\Users\linus\workspace\MiCS 1.2\main.py", line 1, in <module> 
    import wx 
    File "C:\Python34\Lib\site-packages\wx\__init__.py", line 17, in <module> 
    from wx.core import * 
    File "C:\Python34\Lib\site-packages\wx\core.py", line 6, in <module> 
    from ._core import * 
ImportError: DLL load failed: The specified module could not be found. 

我做了一些搜索和修補,仍然無法弄清楚是什麼原因造成的。它不應該是msvcp或msvcr dll,因爲我的Office運行良好(或者這是一個不正確的假設?)任何幫助表示讚賞。謝謝。

+1

這可能類似於問題,http://stackoverflow.com/a/11404318/5781248 –

回答

0

你是如何安裝wxpython的?

截至目前,官方網站的首頁只有python27的wxpython 3.0。所以,我懷疑你可能沒有正確安裝它。

如果你有你的python34在C:/ Python34那麼先cd到C:/ Python34/Scripts,這樣我們就確保使用這個python的pip。

根據這個帖子(https://groups.google.com/forum/#!topic/wxpython-dev/LmGIrQyh7jc),嘗試

pip install -U --pre -f http://wxpython.org/Phoenix/snapshot-builds/ wxPython_Phoenix

這應該找到相應的WHL文件爲您的Python版本和CPU架構。

或者,你可以手動在http://wxpython.org/Phoenix/snapshot-builds/

下載WHL文件如果你有32位Python34,然後尋找****** - CP34-NONE-win32.whl

,簡單地做:

pip install path/to/the/whl/that/you/just/downloaded/wxPython_Phoenix-3.0.3.dev1839+4ecd949-cp34-none-win32.whl

在此之後,如果你能import wx正常CMD那麼這個問題應該從日食到來。