I am trying to install Eric Python IDE 5 in my CentOS 6.4. The problem here is even I have installed PyQT4 its again saying that module is missing. what I am supposed to do ? here is the terminal log

[root@localhost eric5-5.3.5]# yum install PyQt4
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: centos.excellmedia.net
 * epel: mirrors.vinahost.vn
 * extras: centos.excellmedia.net
 * rpmfusion-free-updates: mirror.us.leaseweb.net
 * updates: centos.excellmedia.net
Setting up Install Process
Package PyQt4-4.6.2-9.el6.i686 already installed and latest version
Nothing to do
[root@localhost eric5-5.3.5]# python3 install.py 
Checking dependencies
Python Version: 3.3.2
Sorry, please install PyQt4.
Error: No module named 'PyQt4'
[root@localhost eric5-5.3.5]# 

how can I solve this issue ?


You're using the python3 interpreter but the PyQt4 you get from the repo's is for python 2.6:

[root@ditirlns02 cups]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.4 (Santiago)
[root@ditirlns02 cups]# rpm -ql PyQt4

So that's basically why your install script isn't finding it: it's being installed for the wrong interpreter.

I might ask how you got python 3.0 on there, since it doesn't look like it's in the official repo's for RHEL/CentOS 6 either. If you found a third party repo, there may be a specific PyQt4 package for python 3.0 as well. Otherwise, you may have to try to build PyQt4 from source.

  • from source i have taken – rɑːdʒɑ Nov 8 '13 at 2:04

Your PyQT4 module is installed on the default python (in this case python 2.6).

You can verify this by running:

$ python
>>> import PyQT4

I suggest you install PyQT4 from source (download and run python3 setup.py install).


As Python version is 3.3.2, install pip first.

wget -O - 'https://raw.github.com/pypa/pip/master/contrib/get-pip.py' | python3 -

Install SIP

download from 'http://www.riverbankcomputing.com/software/sip/download' and unpack.

cd sip-4.x.y && python3 configure.py && make && sudo make install

replace x.y with version.

Install PyQt4

Download from 'http://www.riverbankcomputing.com/software/pyqt/download' and unpack.

cd PyQt-x11-gpl-4.x.y && python3 configure-ng.py && make && sudo make install

replace x.y with version.

Check if it's working, python3 -c 'from PyQt4 import QtCore' && echo ok || echo no

Other python packages should be installed for non-system python and virtual environments (virtualenv and pyvenv) thrupip

python3 -m pip install 'package_name'

For system python (/usr/bin/python), always use yum. If used, pip might upgrade some python packages for dependency which might break yum.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.