Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6751737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:57:44+00:00 2026-05-26T12:57:44+00:00

This question was originally asked in askubuntu.com but got no attention so I think

  • 0

This question was originally asked in askubuntu.com but got no attention so I think maybe this is a better place to ask.

I installed PyQt4 with synaptic.

I’m using Python3 so I need to configure the path for PyQt4 in eclipse, but it seems synaptic only installed PyQt4 for python 2 since I only found relative files and folders under python 2.6 and 2.7.

So how can I make PyQt4 to work with Python 3 and eclipse ?

Thanks.

UPDATE:

I tried to configure it following this post: http://ubuntuforums.org/showthread.php?p=10914908#post10914908

But after following all the instructions without any error occurs in the way, I get error from running this code in python 3.2:

>>> import PyQt4

The error message is :

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named PyQt4

But the strange thing is that the same code results NO error in python 2.7 (I have both 2.7 and 3.2 installed on my machine)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T12:57:45+00:00Added an answer on May 26, 2026 at 12:57 pm

    Install packages needed for compiling (I am not sure these all are needed):

    sudo apt install build-essential python3-dev libqt4-dev
    

    Download sources of the latest SIP – sip-4.12.4.tar.gz (Linux, UNIX, MacOS/X source).

    Unpack them and enter the directory:

    vic@wic:~/Desktop/sip-4.12.4$ python3 configure.py 
    This is SIP 4.12.4 for Python 3.2 on linux2.
    The SIP code generator will be installed in /usr/bin.
    ...
    Creating sip module Makefile...
    
    vic@wic:~/Desktop/sip-4.12.4$ make
    make[1]: Entering directory `/home/vic/Desktop/sip-4.12.4/sipgen'
    ...
    make[1]: Leaving directory `/home/vic/Desktop/sip-4.12.4/siplib'
    
    vic@wic:~/Desktop/sip-4.12.4$ sudo make install
    make[1]: Entering directory `/home/vic/Desktop/sip-4.12.4/sipgen'
    ...
    cp -f /home/vic/Desktop/sip-4.12.4/sipdistutils.py /usr/lib/python3/dist-packages/sipdistutils.py
    
    vic@wic:~/Desktop/sip-4.12.4$
    

    Download the sources of the latest PyQt – PyQt-x11-gpl-4.8.5.tar.gz (Linux, UNIX source), and install it:

    vic@wic:~/Desktop/PyQt-x11-gpl-4.8.5$ python3 configure.py 
    Determining the layout of your Qt installation...
    This is the GPL version of PyQt 4.8.5 (licensed under the GNU General Public License) for Python 3.2 on linux2.
    
    Type '2' to view the GPL v2 license.
    Type '3' to view the GPL v3 license.
    Type 'yes' to accept the terms of the license.
    Type 'no' to decline the terms of the license.
    Do you accept the terms of the license? yes
    Found the license file pyqt-gpl.sip.
    Checking to see if the QtGui module should be built...
    ...
    Checking to see if the dbus support module should be built...
    The Python dbus module doesn't seem to be installed.
    Qt v4.7.2 free edition is being used.
    SIP 4.12.4 is being used.
    The Qt header files are in /usr/include/qt4.
    ...
    Creating pyqtconfig.py...
    
    vic@wic:~/Desktop/PyQt-x11-gpl-4.8.5$ make
    make[1]: Entering directory `/home/vic/Desktop/PyQt-x11-gpl-4.8.5/qpy'
    ...
    make[1]: Leaving directory `/home/vic/Desktop/PyQt-x11-gpl-4.8.5/designer'
    
    vic@wic:~/Desktop/PyQt-x11-gpl-4.8.5$ sudo make install
    make[1]: Entering directory `/home/vic/Desktop/PyQt-x11-gpl-4.8.5/qpy'
    ...
    cp -f PyQt4.api /usr/share/qt4/qsci/api/python/PyQt4.api
    

    Note, that I am launching python3 instead of python.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I originally asked this question on RefactorMyCode , but got no responses there... Basically
I originally asked this question on cstheory.stackexchange.com but was suggested to move it to
I originally asked this question , but in finding an answer, discovered that my
I originally asked this question on programmers.stackexchange.com, because I figured the answers would be
I asked this question originally on SuperUser , but it looks like I'm much
I originally asked this question on ServerFault and haven't got any response and I
I originally asked this question on Super User but was told that it might
I originally asked this question on the Highcharts forum a few days ago but
This question originally asked which is the best method for uploading files via SFTP
This question originally asked (wrongly) what does | mean in Python, when the actual

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.