Search code examples
gnuradiognuradio-companion

Custom Block Unable to Be Found


I have an Ubuntu LTS20.04 vm with with GNU Radio installed via PPA. Following the Guided Tutorial GNU Radio in C++, I've created, built, and installed a project identical to the sample presented within.

I went to set up the objective flow graph presented at the beginning of the tutorial in GNURadio companion, but when I attempt to execute the it, I get the following error:

Warning: failed to XInitThreads()
Traceback (most recent call last):
  File "/home/user/Documents/GNURadio Flowgraphs/testqpsk.py", line 38, in <module>
    import tutorial
ModuleNotFoundError: No module named 'tutorial'

What steps do I need to take to resolve this? I should note that the PPA install does not seem to configure paths correctly, as I had to EXPORT GR_PREFIX=/usr to get gr_modtool to function.


Solution

  • The problem was that cmake's default install prefix (/usr/local) does not correspond with default Python search paths. My resolution was the following:

    export PYTHONPATH=/usr/local/lib/python3/dist-packages:/usr/lib/python3/dist-packages:$PYTHONPATH

    Both this export statement and the GR_PREFIX export were added to my ~/.profile.