使用BREW請在安裝PyQt的,像這樣經過:PyQt4的OSX錯誤的體系結構
brew install qt
brew install sip
brew install pyqt
我嘗試運行sript和我得到這個錯誤:
Traceback (most recent call last):
File "exampleosx.py", line 17, in <module>
from PyQt4 import QtGui
ImportError: dlopen(/Library/Python/2.7/site-packages/PyQt4/QtGui.so, 2): no suitable image found. Did find:
/Library/Python/2.7/site-packages/PyQt4/QtGui.so: mach-o, but wrong architecture
我已試過很多教程關於如何使用不同的選項運行代碼,但沒有運氣。
添加「arch -i368」也沒有解決問題。
我使用OSX 10.7.5和Python 2.7.1
感謝您的幫助,不幸的是我解決了這個問題,並不確定如何/何時。如果我再次遇到它,我肯定會嘗試這個。 – CoppolaEmilio 2015-08-24 18:57:09