Page 1 of 1

Latest Ubuntu, python3-pyqt4 and libffi6 not available

Posted: Fri May 15, 2020 6:36 pm
by hunter_235711
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

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

Posted: Tue May 19, 2020 6:16 pm
by hunter_235711
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

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

Posted: Sat May 23, 2020 12:22 pm
by dr_radar
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.

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

Posted: Mon Jun 08, 2020 3:53 pm
by NG-8
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!

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

Posted: Fri Jun 12, 2020 3:06 am
by rtlsdrblog
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?

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

Posted: Sun Jul 05, 2020 3:31 pm
by rfjohnso
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.

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

Posted: Mon Jul 27, 2020 12:38 am
by rfjohnso
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