GNU Radio has error and does not work

I have installed DietPi v8.7.1 bookworm on my Raspberry Pi 4.
I have installed GNU Radio many times successfully on the bullseye systems and on an earlier Debian bookworm system.
When I install GNU Radio from packages, running gnuradio-companion causes an import error:
Cannot import gnuradio
Is the Python path environment variable set correctly?
All OS: PYTHONPATH

The same is suggested for LD_LIBRARY_PATH, but that seems to be deprecated.

It refers to
https://wiki.gnuradio.org/index.php/ModuleNotFoundError
I tried this procedure, but it made no difference.

gqrx has a similar error.

I get the same error on a Debian bookworm image downloaded from https://raspi.debian.net/tested-images/
On this I also installed GNU Radio from source. This worked correctly with my usual PYTHONPATH.

I noticed that the package installs GNU Radio files in 2 places. Is this a problem?
/usr/lib/aarch64-linux-gnu/libgnuradio-runtime.so.3.10.3.0
and
/lib/aarch64-linux-gnu/libgnuradio-runtime.so.3.10.3
There are several similar names in each location, linked to the main libgnuradio-runtime.so file in each location.

Are the packages defective? Am I missing a required package? I used the same support packages as I used for the compiled version.

----Steve

I enabled unstable packages and installed a newer gnuradio package:
gnuradio/unstable,now 3.10.3.0-3 arm64 (3.10.3.0-2 is the default.)

Now, it works, so it must be the package.

----Steve

1 Like

/lib is a symlink to /usr/lib, so both paths are valid, that is not an issue. I’d have suggested to install it via pip but if you are fine with Debian unstable/Sid packages, great that it works.

Using the unstable packages is not an ideal solution.
I think that this should be looked into. If the package is defective, it should be corrected.
I think that others will have this problem also. Not all are good with installing from source.

----Steve

Running Bookworm is introducing such kind of issues, as Bookworm is the next Debian version that is still in development. It will not be released a final before summer 2023.

I guess it has already been corrected as it is working on version 3.10.3.0-3 (sid repository) as you told. Anyway, something that needs to be taken care of by upstream Debian package maintainer and not by us, as we don’t do any Debian package development.

I personally don’t see much reasons to use Debian packages for Python modules at all, at least if PyPI ships pre-compiled wheels (true in most cases for x86_64 and aarch64). Use pip so you always have latest versions and no DEB packaging issues.