1

I am trying to install PyQt5 on an RPi 4/ 4GB for use with the Oasis 3DP controller software: https://hackaday.io/project/86954/instructions?page=2

To do so I've had many problems trying different variations of sudo pip install PyQt5, sudo pip3 install PyQt5, sudo pip3.6 install PyQt5, etc. so I've been following a previous question: PyQt5 on a Raspberry Pi, going the route of downloading the .tar for both sip and PyQt5, then running the configure.py file in each respectively before running sudo make and then sudo make install. I've successfully installed sip using this method, and have successfully run sudo make inside the PyQt5-5.14.4 directory. However, upon trying to run sudo make install, I get the following outputs:

pi@raspberrypi:~ $ sudo make install
cd QtCore/ && ( test -e Makefile || /usr/lib/qt5/bin/qmake -o Makefile /home/pi/Downloads/PyQt5-5.15.4/QtCore/QtCore.pro ) && make -f Makefile install
make[1]: Entering directory '/home/pi/Downloads/PyQt5-5.15.4/QtCore'
g++ -c -pipe -O2 -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DPy_LIMITED_API=0x03040000 -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_CORE_LIB -I. -I. -isystem /usr/local/include/python3.6m -I../qpy/QtCore -isystem /usr/include/arm-linux-gnueabihf/qt5 -isystem /usr/include/arm-linux-gnueabihf/qt5/QtCore -I. -I/usr/lib/arm-linux-gnueabihf/qt5/mkspecs/linux-g++ -o qpycore_post_init.o qpycore_post_init.cpp
In file included from ../qpy/QtCore/qpycore_api.h:30,
                 from qpycore_post_init.cpp:25:
../qpy/QtCore/qpycore_public_api.h:26:10: fatal error: sip.h: No such file or directory
 #include <sip.h>
          ^~~~~~~
compilation terminated.
make[1]: *** [Makefile:1227: qpycore_post_init.o] Error 1
make[1]: Leaving directory '/home/pi/Downloads/PyQt5-5.15.4/QtCore'
make: *** [Makefile:82: sub-QtCore-install_subtargets-ordered] Error 2

I've tried manually copying sip.h from the /home/pi/Downloads/sip-4.19.25/sipgen directory, but then it spits out an even longer and more incomprehensible error message to the terminal. Has anyone else tried running the controller software for Oasis from an RPi or has experience trying to install PyQt5 for this specific version of Python?

Nate
  • 11
  • 3
  • No Raspberry Pi OS has had python3.6 so you need to explain how (and why you installed it) – Milliways Apr 08 '21 at 22:09
  • You say you're running sudo make install, but the log you attached features a different command (much longer and without sudo). – Dmitry Grigoryev Apr 09 '21 at 07:35
  • @Milliways I used this guide to install Python 3.6.2: https://medium.com/@isma3il/install-python-3-6-or-3-7-and-pip-on-raspberry-pi-85e657aadb1e And I needed this version of Python to run the controller software for the above-linked hackaday project as that was what the original author wrote the code in. I'm not super experienced with Python, so I'm following his instructions to use this specific Python version. – Nate Apr 09 '21 at 13:18
  • @DmitryGrigoryev I mentioned that the block was just the output from running 'sudo make install', but I've added the original command to clarify. – Nate Apr 09 '21 at 13:24
  • The (very old and misinformed) link you quoted does not require 3.6 it would work with the default 3.7. Incidentally the link suggests a number of poor practices likely to break other things. It is never necessary to install a python version older than your system default. – Milliways Apr 09 '21 at 13:28
  • The issue isn't with the old guide I followed, it's with the Hackaday project stating that the software needs to be run in Python 3.6.2. I've been in contact with the maker and he has restated this as well. – Nate Apr 09 '21 at 13:33

0 Answers0