Using brew
brew install pyqt (會自動安裝dependency)
但是,安裝完畢后, 運行
$ brew test pyqt
沒有問題
實際import PyQt4的時候還是找不到
運行$brew info pyqt
發(fā)現(xiàn):
Phonon support is broken.
Python modules have been installed and Homebrew's site-packages is not
in your Python sys.path, so you will not be able to import the modules
this formula installed. If you plan to develop with these modules,
please run:
mkdir -p /Users/Tiger/Library/Python/2.7/lib/python/site-packages
echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/Tiger/Library/Python/2.7/lib/python/site-packages/homebrew.pth
運行了上面2行命令之后, 發(fā)現(xiàn)可以在python 2.7中運行了。
但是3.5中依然不行。
因此更改為:
echo 'import site; site.addsitedir("/usr/local/lib/python3.5/site-packages")' >> /Users/Tiger/Library/Python/3.5/lib/python/site-packages/homebrew.pth
依然不行。
最后還是下載的源代碼自己編譯安裝的。
from riverbank (Qt4)
本站僅提供存儲服務,所有內容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權內容,請
點擊舉報。