Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: How to set up PyQt4 for python 3.2 in Ubuntu 11.04

  1. #1
    Join Date
    Jun 2011
    Beans
    3

    How to set up PyQt4 for python 3.2 in Ubuntu 11.04

    1) Open the synaptic package manager and install python 3.2
    2) Open a terminal emulator and type
    Code:
    sudo apt-get install libqt4-dev
    3) Download the program SIP from http://www.riverbankcomputing.co.uk/...-4.12.3.tar.gz
    4) extract the folder using tar -xzf sip-4.12.3.tar.gz, cd into folder
    5) in terminal emultator, type
    Code:
    python3.2 configure.py
    make
    sudo make install
    now sip is installed
    6) install pyqt4 with the command
    Code:
    sudo apt-get install python-qt4 qt4-dev-tools python-qt4-dev pyqt4-dev-tools
    If that didn't work for you, download pyqt4 from http://www.riverbankcomputing.co.uk/...l-4.8.4.tar.gz
    Untar and install pyqt4 the same way you installed SIP

    you should be able to type in terminal
    Code:
    python3.2
    >>import sys
    >>from PyQt4 import QtGui
    If you didn't get any errors, you installed everything correctly

  2. #2
    Join Date
    May 2011
    Beans
    1

    Re: How to set up PyQt4 for python 3.2 in Ubuntu 11.04

    Thank you very much. Your clear instructions worked perfectly.

  3. #3
    Join Date
    Aug 2007
    Location
    From the land down under
    Beans
    1,241
    Distro
    Ubuntu Development Release

    Re: How to set up PyQt4 for python 3.2 in Ubuntu 11.04

    Just bumping this because it's really great!
    // Blog

  4. #4
    Join Date
    Jul 2011
    Beans
    2

    Re: How to set up PyQt4 for python 3.2 in Ubuntu 11.04

    Hello everyone,

    I try to install PyQt for Python3 on Debian6 (I know that here is Ubuntu, but Ubuntu and Debian are pretty close, I hope to find a solution here).

    The installation is complicated (currently) at the make command to sip install.

    Here is an excerpt of the error message I get in the terminal

    siplib.c: In function ‘sip_api_convert_from_sequence_index’:
    siplib.c:5279: error: ‘PyExc_IndexError’ undeclared (first use in this function)
    siplib.c: At top level:
    siplib.c:5291: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    siplib.c:5317: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    ...
    ...
    ...
    ...
    siplib.c:10457: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    siplib.c:10468: error: expected ‘)’ before ‘*’ token
    siplib.c:10496: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    siplib.c:10506: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    siplib.c:10534: error: expected ‘)’ before ‘*’ token
    siplib.c:10557: error: expected ‘)’ before ‘*’ token
    siplib.c:10582: error: expected ‘)’ before ‘*’ token
    siplib.c:10816: error: expected ‘)’ before ‘*’ token
    siplib.c:10827: error: expected ‘)’ before ‘*’ token
    siplib.c: In function ‘raiseNoWChar’:
    siplib.c:10840: error: ‘PyExc_SystemError’ undeclared (first use in this function)
    siplib.c: At top level:
    siplib.c:10849: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    siplib.c:10882: error: expected ‘)’ before ‘*’ token
    make[1]: *** [siplib.o] Erreur 1
    make[1]: quittant le répertoire « /home/charlie/Téléchargements/sip-4.12.3/siplib »
    make: *** [all] Erreur 2
    If anyone has an idea, I'm interested greatly.

    In advance thank you.

  5. #5
    Join Date
    May 2006
    Beans
    115

    Re: How to set up PyQt4 for python 3.2 in Ubuntu 11.04

    I think you need to install the Python 3 development package. i.e. python3-dev, python3.2-dev or something like that.

  6. #6
    Join Date
    Jul 2011
    Beans
    2

    Re: How to set up PyQt4 for python 3.2 in Ubuntu 11.04

    Thank you very much, it is this that I was missing

  7. #7
    Join Date
    Sep 2011
    Beans
    1

    Re: How to set up PyQt4 for python 3.2 in Ubuntu 11.04

    Hi, very useful post! Although I couldn't manage to install the library with 2.x and 3.x coexisting in the same setup. Has anyone of you managed to do so?

  8. #8
    Join Date
    Mar 2012
    Beans
    1

    Re: How to set up PyQt4 for python 3.2 in Ubuntu 11.04

    Hi thank you a lot for this guide! I had to recompile everything on my 11.10 but now everything's working

  9. #9
    Join Date
    Apr 2011
    Location
    Chittagong,Bangladesh
    Beans
    149
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: How to set up PyQt4 for python 3.2 in Ubuntu 11.04

    Thanx a lot for this tutorial , i m searching this kind of tutorial for a while .....

  10. #10
    Join Date
    May 2012
    Beans
    1

    Re: How to set up PyQt4 for python 3.2 in Ubuntu 11.04

    Thanks for the help.
    However I have to do a few extra steps like installing python3.2-dev and g++

    I'm running Ubuntu 12.04

    1) Install python3.2 using the software centre
    2) Open terminal and type
    Code:
    sudo apt-get install python3.2-dev libqt4-dev g++ python-qt4 qt4-dev-tools python-qt4-dev pyqt4-dev-tools
    3) Download SIP http://www.riverbankcomputing.co.uk/...e/sip/download
    4) Download PyQt http://www.riverbankcomputing.co.uk/.../pyqt/download
    5) Untar both downloads
    6) cd into sip folder
    7) run
    Code:
    python3.2 configure.py;make;sudo make install
    8] cd into pyqt folder
    9) run
    Code:
    python3.2 configure.py;make;sudo make install
    10) test if it works like neurobot says in first post.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •