0

I installed the UHD and GNU Radio on Ubuntu 16.4 based on instructions (https://kb.ettus.com/Building_and_Installing_the_USRP_Open-Source_Toolchain_(UHD_and_GNU_Radio)_on_Linux)

I’m getting the following error when I try to run the example provided on the same page:

python /home/acsl/workarea-gnuradio/gnuradio/gr-audio/examples/python/dial_tone.py

Traceback (most recent call last):

File "/home/acsl/workarea-gnuradio/gnuradio/gr-audio/examples/python/dial_tone.py", line 23, in

from gnuradio import gr

ImportError: No module named gnuradio

my PYTHONPATH variable is set to : /usr/local/lib/python2.7/dist-packages

as directed by the installation page.

Prior to installing GNU radio I had Anaconda with Python installed. When check which Python installation is being used I get:

/home/abd/anaconda2/bin/python

It seems that there is some misalignment between the default python used and python expected to run in this example. Could somebody with more experience help me resolve this issue?

Thank you!

Steve
  • 129
  • 1
  • 14
  • 1
    Try to run this script with default python version. Seems to be that you are trying to run anaconda python, but gnuradio was i stalled into default python locatio s – Alex Bender Jan 24 '18 at 19:38
  • Thanks for the response. I'm new in Linux and I'm not sure how to run the default python version. Any help is appreciated. – Steve Jan 24 '18 at 19:56
  • try to run command `which python` or `where python`. One of them will give you the path to python exacutables. then try to run your script with that path. something like `/usr/bin/python path/to/your/script.py` – Alex Bender Jan 24 '18 at 21:15
  • If you are using Pycharm as your IDE then there is a duplicate answer here https://stackoverflow.com/questions/19885821/how-do-i-import-modules-in-pycharm This may also help answer your question if you aren't using Pycharm – Campbell McDiarmid Apr 12 '18 at 02:30
  • Possible duplicate of [How do I import modules in pycharm?](https://stackoverflow.com/questions/19885821/how-do-i-import-modules-in-pycharm) – Campbell McDiarmid Apr 12 '18 at 20:50

0 Answers0