Somewhat a NOOB to Python, USRP, GNURadio… and needing some help.
I am getting the error (below) when I try to execute a Python xxx.py
progam…
ImportError: cannot import name blks2
Here is what I am trying to do. I am trying to run an installed OSMOCOM
radio program xxx.py
With examination… in the OSMOCOM xxx.py file… line #17 is trying to
import a number of GNUradio and Python packages.
Line #17 looks like:
from gnuradio import gr, gru, eng_notation, blks2, optfir
I am running Ubuntu 14.04…
I have done the following…
- Installed the latest 3.7x GNUradio package
- I want to run with a N210 USRP SDR… Installed the UHD driver from
Ettus.com
(http://ettus-apps.sourcerepo.com/redmine/ettus/projects/uhd/wiki) - Downloaded OSMOCOM code and built it from GitHub.
After a while of Googling for answers… I have wound up here to post
for help.
From previous threads out on the internet, I feel like I just have a
Python import problem… and really not a GNUradio, OSMOCOM, or USRP
problem. So I am not going to go list specifics at this time on the
***.py file and GNUradio specifiics…
From other threads my guess is that the problem lies in that I was
missing a $PYTHONPATH env variable.
The BLKS2 module is located in my
/usr/lib/python2.7/dist-packages/grc_gnuradio directory.
I tried adding this $PYTHONPATH env variable, and to point to the
specific directory… but the error still occurs.
I do have other Python versions on the Linux machine, but no other env
variable points to another version of Python.
Would I have a Python install problem? However it is a fresh load of
Ubuntu… so I would think this would have installed correctly in the
default load of the OS.
Should my $PYTHONPATH env variable contain more paths that just:
PYTHONPATH=/usr/lib/python2.7/dist-packages
or
PYTHONPATH=/usr/lib/python2.7/dist-packages/grc_gnuradio/blks2
Any help would be greatly appreciated!! Thanks in advance.
-kenhokie