Reputation: 9814
I have PyQt4 installed and running with Python2.7 on Ubuntu, this works fine. Now I want to use PyQt4 with Python3.
I get a message:
The Qt Designer plugin was disabled because a dynamic Python library could not be found.
I then ran make
and had an error that Python.h
could not be found. I then created a sym link as per this answer
I then ran make again I got an error:
fatal error abstractaudiooutput.h No such file or directory and compilation was terminated.
I tried a virtual environment and installed pyhton3.4 from scratch. Things progressed much further than previously but then I again got the same error with abstractaudiooutput.h
.
Upvotes: 1
Views: 4253
Reputation: 9814
One way to get pyQt4 working in Ubuntu: Install Ubuntu14.04 Install virtualenv and virtualenvwrapper eg virtualenv, virtualenvwrapper
Create a python3 virtualenv
mkvirtualenv testpy3 -p /usr/bin/python3.4
Now you should see (testpy3) at start of command line. In this shell install sip (I got it working this way but may be better to download latest from riverbankcomputing as per pyQt below)
pip install sip
make
sudo make install
download pyQt from http://www.riverbankcomputing.com/software/pyqt/download cd to the download folder, unpack the downloaded file. cd into the unpacked folder. type
python configure-ng.py
make
sudo make install
Now test with
python
>>import PyQt4
This should work without errors. Now in PyCharm file->settings->Project:Project Interpreter select the gear icon on topRHS->add local navigate to your testpy3 virtualenv (eg in /home/user/.virtualenvs). Through PyQt4 doesn't appear in the package list, PyCharm detected it and PyQt4 gui's are working for me.
Upvotes: 2