Latest Ubuntu, python3-pyqt4 and libffi6 not available

Discuss KerberosSDR - 4x Coherent RTL-SDR
Post Reply
hunter_235711
Posts: 2
Joined: Fri May 15, 2020 6:33 pm

Latest Ubuntu, python3-pyqt4 and libffi6 not available

Post by hunter_235711 » Fri May 15, 2020 6:36 pm

Hello, I'm following the instructions here to get Kerberos SDR set up on my PC running Ubuntu 20.04 LTS. However, I get the following error when I try to install all the packages.

Code: Select all

[email protected]:~$ sudo apt install python3-pip python3-pyqt4 build-essential gfortran libatlas3-base libatlas-base-dev python3-dev python3-setuptools libffi6 libffi-dev python3-tk pkg-config libfreetype6-dev php-cli wondershaper
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package python3-pyqt4
E: Unable to locate package libffi6
Thanks!
-Hunter

hunter_235711
Posts: 2
Joined: Fri May 15, 2020 6:33 pm

Re: Latest Ubuntu, python3-pyqt4 and libffi6 not available

Post by hunter_235711 » Tue May 19, 2020 6:16 pm

I was able to get it working, I just modified the python code to use QT5 instead of QT4. I might put the modified code on github in case other people are interested.

-Hunter

dr_radar
Posts: 4
Joined: Sat May 23, 2020 12:20 pm

Re: Latest Ubuntu, python3-pyqt4 and libffi6 not available

Post by dr_radar » Sat May 23, 2020 12:22 pm

Hey,

I found that problem as well. I ended up just making a new Linux build around 18.04. A install that works with Ubuntu 20.04 would be good if you could share those edits.

NG-8
Posts: 4
Joined: Mon May 25, 2020 2:11 pm

Re: Latest Ubuntu, python3-pyqt4 and libffi6 not available

Post by NG-8 » Mon Jun 08, 2020 3:53 pm

Hello,
interesting discussions. I have the same problem with Ubuntu 20.04. The ibffi6 and python3-pyqt4 have been updated to libffi7 and python3-pyqt5 under Ubuntu 20.04. However, that does not fix the problem (see my independent post "Kerberossdr software on Ubuntu 20.04 LTS" - just recognized your post that is addressing the same problem.
@hunter_235711 - could you please describe how you have changed the code to use QT5 (if that fixes the problem)?
Many thanks!

rtlsdrblog
Site Admin
Posts: 2706
Joined: Mon Nov 19, 2012 11:54 pm

Re: Latest Ubuntu, python3-pyqt4 and libffi6 not available

Post by rtlsdrblog » Fri Jun 12, 2020 3:06 am

hunter_235711 wrote:
Tue May 19, 2020 6:16 pm
I was able to get it working, I just modified the python code to use QT5 instead of QT4. I might put the modified code on github in case other people are interested.

-Hunter
Yes if you can put it on Github that would be great! I assume everything is still functional after the port?

rfjohnso
Posts: 4
Joined: Thu Mar 21, 2019 3:50 pm

Re: Latest Ubuntu, python3-pyqt4 and libffi6 not available

Post by rfjohnso » Sun Jul 05, 2020 3:31 pm

I would be interested in your github repo too. Just changing the references in the python code to PyQt5 didn't do anything for me.

rfjohnso
Posts: 4
Joined: Thu Mar 21, 2019 3:50 pm

Re: Latest Ubuntu, python3-pyqt4 and libffi6 not available

Post by rfjohnso » Mon Jul 27, 2020 12:38 am

I got this to work on my machine in kubuntu 20.04 LTS and Ubuntu 20.04 LTS (although I did more extensive testing in kubuntu.)

As Hunter indicated, you need to change all of the imports from PyQt4 to PyQt5, but PyQt5 uses slightly different syntax. Wherever you see a PyQt4 import statement in the python files change it to:

from PyQt5 import QtGui, QtCore
from PyQt5.QtCore import *
from PyQt5.QtGui import *

The files that need changing are:
_GUI/hydra_main_window.py,
_signalProcessing/hydra_signal_processor.py
_GUI/hydra_main_window_layout.py

Also, you need to find/replace all the instances of .setMargin(0) to .setContentsMargins(0,0,0,0) in the _GUI/hydra_main_window_layout.py file. I think there are 4 occurrences.

Finally, You need to install python3-pyqt5 and libffi7 (sudo apt install python3-pyqt5 libffi7)

I forked the ksdr github repo and created a new branch called PyQt5 and I also created a draft pull request for it. If anyone wants to test it and let me know if it works ok for you too, that would be great. Otherwise, you can just make these modifications manually.

https://github.com/rfjohnso/kerberossdr/

If it doesnt work for some reason, please turn up logging in the run.sh file and check what the error messages are. The logging can be helpful. (see the end of the readme for how to turn up logging.)

-R

Post Reply