Qt for Mac 安裝(包括PyQt)

下載Qt:python

http://qt-project.org/downloadsxcode

Qt5.2 for Mac:http://download.qt-project.org/official_releases/qt/5.2/5.2.1/qt-opensource-mac-x64-clang-5.2.1.dmgspa

注意!你的Mac裏必定要有gcc,我用的xcode。.net

下載完畢以後運行就行了,一路OK到底。code

 

下面是PyQt的安裝方式:blog

一、安裝sip:ip

若是你習慣用Python能夠這樣:ci

pip install sip

我是用的另外一種方式:get

wget http://sourceforge.net/projects/pyqt/files/sip/sip-4.15.5/sip-4.15.5.tar.gz  
tar -xzvf sip-4.15.5.tar.gz  
cd sip-4.15.5  
python configure.py  
make  
sudo make install

二、安裝PyQt:qt

wget http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-4.10.4/PyQt-gpl-4.10.4.tar.gz  
tar -xzvf PyQt-gpl-4.10.4.tar.gz
cd PyQt-gpl-4.10.4.tar.gz  
-q /Users/username/Qt5.2.0/5.2.0/clang_64/bin/qmake -d /Library/Python/2.7/site-packages/ --sip /System/Library/Frameworks/Python.framework/Versions/2.7/bin/sip  # 這裏須要主要的是,-q 參數後面的是Qt的qmake位置,-d參數爲python位置,--sip的闡述魏sip的位置,根據本身的目錄自行修改
make 
sudo make

而後就完成安裝了。

相關文章
相關標籤/搜索