2014-05-13 196 views
2

我正試圖在我的小牛機上安裝PyQt5。在小牛上安裝PyQt5

我試圖做到像在這裏這個鏈接Installing PyQt5 with Python 3 On OS X

當我嘗試安裝與釀造QT5,總會有一個警告:

qt5-5.2.1 already installed 

但是當我鍵入python configure.py

終端說:

querying qmake about your Qt installation... Error: PyQt5 requires Qt 
v5.0 or later. You seem to be using v4.8.6. Use the 
--qmake flag to specify the correct version of quake. 

Ca任何人都可以幫助我嗎?

+0

那麼你是否使用了'qq標誌和'qmake'文件的有效路徑? – ChrisW

回答

10

當您通過自制軟件Qt安裝,您應該已經收到了類似的警告:

This formula is keg-only, so it was not symlinked into /usr/local. 

Qt 5 conflicts Qt 4 (which is currently much more widely used). 

Generally there are no consequences of this for you. If you build your 
own software and it requires this formula, you'll need to add to your 
build variables: 

    LDFLAGS: -L/usr/local/opt/qt5/lib 
    CPPFLAGS: -I/usr/local/opt/qt5/include 

雖然這個信息是非常有幫助的,你是專門尋找將在一個目錄下/usr/local/opt/qt5/$VERSION_OF_QT/bin/作爲qmake是一個二進制工具。

對我而言,qmake位於/usr/local/Cellar/qt5/5.3.1/bin/qmake。走這條路,把它送到你的--configure開關,你就會全部設置!

例如python configure.py --qmake /usr/local/Cellar/qt5/5.3.1/bin/qmake

+0

我很想知道你爲什麼沒有投票,但是你的信息讓我走上了正確的軌道。謝謝。 – jollyroger

+0

@jollyroger歡呼:) –

+0

@jollyroger究竟是我們需要放在哪裏的擴展文件位置 – Fahadkalis