1

I am trying to install GNU Radio manually on my Ubuntu 19.10 by following official instructions( https://wiki.gnuradio.org/index.php/InstallingGR)

When I try to run GNU Radio, this error pops up:

Is the python path environment variable set correctly? All OS: PYTHONPATH

Is the library path environment variable set correctly? Linux: LD_LIBRARY_PATH Windows: PATH MacOSX: DYLD_LIBRARY_PATH

No module named 'gnuradio'

I have checked similar posts on this issue on Stackoverflow, but still could not manage to fix.

How can I correctly set variables based on following current parameters?

galib@galib-Lenovo-Y50-70:~$ python --version

Python 3.7.5


galib@galib-Lenovo-Y50-70:~$ echo $PYTHONPATH

:/lib/python3.7/dist-packages


galib@galib-Lenovo-Y50-70:~$ echo $LD_LIBRARY_PATH

/opt/qt/lib:/usr/local/lib::/home/galib/miniconda3/envs/dsp/lib


galib@galib-Lenovo-Y50-70:~$ which python

/usr/bin/python


galib@galib-Lenovo-Y50-70:~$ gnuradio-config-info -v
3.8.1.0
galib@galib-Lenovo-Y50-70:~$ gnuradio-config-info --prefix
/usr/local


galib@galib-Lenovo-Y50-70:~$ find /usr/local -name gnuradio | grep "packages"
/usr/local/lib/python3/dist-packages/gnuradio


galib@galib-Lenovo-Y50-70:~$ whereis python

python: /usr/bin/python3.7 /usr/bin/python3.7-config /usr/bin/python /usr/bin/python2.7-config /usr/bin/python2.7 /usr/bin/python3.7m-config /usr/bin/python3.7m /usr/lib/python3.7 /usr/lib/python3.6 /usr/lib/python3.8 /usr/lib/python2.7 /etc/python3.7 /etc/python /etc/python2.7 /usr/local/lib/python3.7 /usr/local/lib/python2.7 /usr/include/python3.7 /usr/include/python2.7 /usr/include/python3.7m /usr/share/python /usr/share/man/man1/python.1.gz
Galib
  • 33
  • 1
  • 7

1 Answers1

0
galib@galib-Lenovo-Y50-70:~$ find /usr/local -name gnuradio | grep "packages"
/usr/local/lib/python3/dist-packages/gnuradio

You need to add /usr/local/lib/python3/dist-packages to PYTHONPATH environment variable as this directory is not in the default python search paths (sys.path)

Open a new terminal and execute the following

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

to make this change permanent you can add the export line to ~/.profile file. See also Module Not Found Error.

Vasil Velichkov
  • 1,236
  • 11
  • 17
  • Thanks, It opened GRC, and worked. But still, when I try to launch it from its icon on toolbar, it gives me the same error. But works when launched on terminal. Do you know why? @vasil P.S. I checked official Module Not Found Error page as well, but did not figure it out. – Galib Mar 21 '20 at 21:03
  • trying to tag you @Vasil Velichkov – Galib Mar 21 '20 at 21:06
  • 1
    @Galib, you need to logout and login again or restart in order to reload the profile. – Vasil Velichkov Mar 21 '20 at 21:08
  • It worked! Should I be worried about LD_LIBRARY_PATH variable? Because I entered only PYTHONPATH as you wrote. @vasil – Galib Mar 21 '20 at 21:13
  • 1
    @Galib, no, that's not needed in your case. – Vasil Velichkov Mar 21 '20 at 21:18