I just installed a raspberry pi operating system on a micro sd memory to migrate to this a system that works with pyqt4, but I have the problem that now I cannot install PyQt4 on this new operating system because everything gives me error.
I already tried the classic:
pip install PyQt4 sudo apt-get install python-qt4
I even tried to do it manually from https://www.riverbankcomputing.com/software/pyqt/download but when I followed the steps and ran
sudo python configure-ng.py
it gives me the error:
pi@raspberrypi:~/PyQt4_gpl_x11-4.12.3 $ sudo python configure-ng.py Querying qmake about your Qt installation... Determining the details of your Qt installation... This is the GPL version of PyQt 4.12.3 (licensed under the GNU General Public License) for Python 2.7.18 on linux2. Error: This version of PyQt4 and the commercial version of Qt have incompatible licenses.
So, my question is if anyone could help me with the installation of this library, the operating system I have is:
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
So I couldn't solve the issue yet, I suggest you update to pyQT5 as 4 is now considered outdated and not supported. However, i do have a pi with bullseye running on it as well so I attempted to install PyQT4 and this is the steps I took and how far i got. I think i got past the license issue you had.
Install sudo apt install build-essential python-dev first
1- Then , I downloaded the package from https://www.riverbankcomputing.com/software/pyqt/download
2- then I had to manually install sip and sipconfig manually. Because pip didn't install sipconfig correctly on python2 via pip or python3 via pip3.
I installed it from https://github.com/ArnaudParan/python-sip/tree/master and had to install sudo apt install python3-setuptools.
Then run sudo python setup.py devleop
3- After that i got this error Determining the layout of your Qt installation... Error: /usr/bin/qmake failed to create a makefile. Make sure you have a working Qt qmake on your PATH or use the -q argument to explicitly specify a working Qt qmake.
4- I attempted to install qt4-make using apt but it's not available by default. You have to add a line to your /etc/apt/sources.list like this:
deb http://security.debian.org/debian-security buster/updates main.
then run sudo apt update. then you could run sudo apt install qt4-make. ofc if you have qt5-make installed please purge it and remove it.
5- Then I ran python3 configure.py -q /usr/lib/aarch64-linux-gnu/qt4/bin/qmake --verbose on the pyQT4 package repo i downloaded and unzipped in step 1 and ended up with this error.
Determining the layout of your Qt installation... /usr/lib/aarch64-linux-gnu/qt4/bin/qmake -o qtdirs.mk qtdirs.pro make -f qtdirs.mk g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_CORE_LIB -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4 -I. -o qtdirs.o qtdirs.cpp qtdirs.cpp:1:10: fatal error: QCoreApplication: No such file or directory 1 | #include | ^~~~~~~~~~~~~~~~~~ compilation terminated. make: *** [qtdirs.mk:201: qtdirs.o] Error 1 Error: Failed to determine the layout of your Qt installation
I am not sure whats causing this issue. but I wanted to share my progress with you it might help you unblock or so.