How can I install Pysde2 in Raspberry pi?
-
@Pablo-J.-Rogina I didn't find any relevant information about installing PySide in Arch Linux ARM. Can you please help me out ?
-
@Pablo-J.-Rogina Alright, thanks, I guess I will go with the Arch Linux option only as migrating to C++ for the whole project will be too big of a task. Raspbian buster, which is an ongoing project to create complete Debian os for RPI will also work with PySide2.
-
@Pablo-J.-Rogina Have you tried installing PySide2 in arch linux arm. I installed arch linux in raspberry pi and have been trying to install the pyside2 using pacman manager but had no luck yet :(
-
@RG97 said
Have you tried installing PySide2 in arch linux arm
yes I did
[alarm@alarmpi ~]$ uname -a Linux alarmpi 4.19.32-1-ARCH #1 SMP PREEMPT Thu Apr 4 00:12:02 UTC 2019 armv7l GNU/Linux
[alarm@alarmpi ~]$ pacman -Qlq pyside2 ... /usr/include/PySide2/QtCore/ /usr/include/PySide2/QtCore/pyside2_qtcore_python.h ...
I installed arch linux in raspberry pi
Are you talking about Arch Linux ARM, right?
and have been trying to install the pyside2 using pacman manager but had no luck yet :(
What happened? What error(s) did you get?
-
Are you talking about Arch Linux ARM, right?
Yes, talking about Arch Linux ARM only.
Okay so I was able to install it using pacman manager only[root@alarmpi alarm]# uname -a Linux alarmpi 4.19.46-1-ARCH #1 SMP PREEMPT Thu May 30 13:54:52 UTC 2019 armv7l GNU/Linux [root@alarmpi alarm]# pacman -Qlq pyside2 ... /usr/include/PySide2/QtCore/ /usr/include/PySide2/QtCore/pyside2_qtcore_python.h ...
But whenever I try to run the following snippet of code
#!/usr/bin/python import sys from PySide2.QtWidgets import QApplication, QPushButton from PySide2.QtCore import Slot @Slot() def say_hello(): print("Button clicked, Hello!") # Create the Qt Application app = QApplication(sys.argv) # Create a button, connect it and show it button = QPushButton("Click me") button.clicked.connect(say_hello) button.show() # Run the main Qt loop app.exec_()
It is showing me this error
[root@alarmpi alarm]# python test.py Bus error (core dumped)
Not able to get any clue regarding this.
-
What version of of PySide2 do you have ?
What version of Qt ?
Did you try to run an equivalent C++ version of your application ? -
What version of of PySide2 do you have ?
What version of Qt ?I just installed PySide2 in a freshly installed Arch Linux ARM running on raspberry pi. As far as I know, PySide runs long with Qt version >=5.11 .Correct me if am wrong, I don't need to build the Qt Core separately along with installing PySide2 in order to make it work ?
-
No you don't have to build anything. But still the exact version will be nice to have.
And please, try to build and run a dummy Qt widget application to see if it also fails.
-
@SGaist
PySide2 version is 5.12.13.[root@alarmpi alarm]# python3 Python 3.7.3 (default, Mar 29 2019, 06:12:40) [GCC 8.2.1 20181127] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import PySide2 >>> print(PySide2.__version__) 5.12.3 >>>
I tried running simple widget example test2.py as given below
import sys from PySide2.QtWidgets import QApplication, QLabel app = QApplication(sys.argv) label = QLabel("Hello World!") label.show() app.exec_()
It gave me the same error
[root@alarmpi alarm]# python3 test2.py Bus error (core dumped)
-
That's why I asked you to test the C++ equivalent of your test application. To see whether it's a PySide2 or a mare general issue.
-
@SGaist I built one c++ equivalent of a simple widget application for a raspberry pi kit and tried to run that. It gave me the same error i.e. Bus error(core dumped).
I use the same kit in Qt Creator to build Qml based C++ apps to be run on raspberry pi running raspbian stretch and those apps run smoothly. -
Are you doing all of that directly on the Pi or are you cross-compiling ?
-
Then you have at least two versions of Qt on your target.
Where are they located ?
-
@SGaist I didn't get you exactly. I did a fresh installation of Arch Linux ARM and built PySide2 in it along with the required Qt packages. After doing all this I tried to run a simple PySide2 example and encountered the above error which I mentioned.
-
@RG97 said in How can I install Pysde2 in Raspberry pi?:
I did a fresh installation of Arch Linux ARM and built PySide2 in it along with the required Qt packages
Please be aware that I did a fresh installation of Arch Linux ARM and then I've just installed (via pacman) the Pyside2 package, which also installed in the same process the required Qt packages.
Nothing was built in the RPi device (not Qt nor PySide2...) -
Please be aware that I did a fresh installation of Arch Linux ARM and then I've just installed (via Pacman) the Pyside2 package, which also installed in the same process the required Qt packages.
Nothing was built in the RPi device (not Qt nor PySide2...)And It worked for you? I mean were you able to run PySide2 python scripts after that ?
-
I mean were you able to run PySide2 python scripts after that ?
Yes, see screenshot (using code from this example)
-
@Pablo-J.-Rogina said in Not able to install PySide2 for raspberry pi:
If you can use Arch Linux ARM as the OS for the RPi device, you may want to use already available packages for such platform. See ongoing discussion here.
That's a great option. Also, the technical preview version (5.11) can be downloaded from new Raspbian Buster repository. My problem with these solutions is that I want to install PySide2 as a regular python package, so I can handle all dependencies of my application in the same way. That's the reason I'm using custom wheels. But, of course, Arch Linux ARM job looks amazing.