Ubuntu 12.04 安装PYQT4和Eric4

时间:2022-04-22 04:16:59

1、安装sip

 tar xvf sip-4.14.tar.gz
cd sip-4.14/
python configure.py
make
make install

2、安装qmake及qt4

sudo apt-get install libqt4-devlibqt4-debug libqt4-gui libqt4-sql qt4-dev-tools qt4-doc qt4-designerqt4-qtconfig

3、安装PYQT4

tar xf PyQt-x11-gpl-4.9.5.tar.gz
cd PyQt-x11-gpl-4.9.5/
python configure.py
make
make install

4、安装QScintilla

tar xvf QScintilla-gpl-snapshot-2.6.3-80df6cc89bae.tar.gz 
cd QScintilla-gpl-snapshot-2.6.3-80df6cc89bae/
cd Qt4Qt5/
qmake qscintilla.pro
make
sudo make install
cd ..
cd Python/
sudo python configure.py
make
sudo make install
cd ..
cd designer-Qt4/
qmake designer.pro
make
sudo make install

5、安装Eric4

tar xvf eric4-4.5.7.tar.gz
tar xvf eric4-i18n-zh_CN.GB2312-4.5.7.tar.gz
cd eric4-4.5.7/
python install.py

6、启动Eric4

 /usr/local/bin/eric4


Eric4配置参考:


初次打开Eric4,一个配置窗口会首先出现,这里可以简单的配置一下(或者以后在Settings – Preferences中配置也可以):

在Eidtor下面,

点击APIs,勾选上”Compile APIs automatically”,选择Language为”Python”,点击Add from installed APIs,选择eric4.api或其它你需要的APIs。然后点击下面的”Compile APIs”,这里会需要点时间。结束后点Apply。

然后点击Autocompletion,里面的三个都勾选上。

然后再点击QScintilla,选”from Document and API files”。

Apply 然后 OK。