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
Re: How to set up PyQt4 for python 3.2 in Ubuntu 11.04
Thank you very much. Your clear instructions worked perfectly.
Re: How to set up PyQt4 for python 3.2 in Ubuntu 11.04
Just bumping this because it's really great!
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
Quote:
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.
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.
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
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?
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;)
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 ..... :)
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.
Re: How to set up PyQt4 for python 3.2 in Ubuntu 11.04
Quote:
Originally Posted by
Robin H
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.
It works perfectly with ubntun12.04
thanks for all the trouble.
Instructions were very precise and clear.