Import Error with usrp2


#1

Last week, I succeed to get a response from my usrp2.

After that, however, when I try usrp2_fft.py, or anything *.py related
with usrp2, I get the “Import Error with usrp2” error.

(But when I try something *.py with usrp, it shows no error with usrp
library though it fails to work since no usrp is connected.)

I guess it fails to find the usrp2 library in the python code.

Can you guys help me with this error?

Young C. Park


#2

Hello, Yc Park
I think that maybe you forget to set PYTHONPATH.

Shih-Shen

Yc Park wrote:

Last week, I succeed to get a response from my usrp2.

After that, however, when I try usrp2_fft.py, or anything *.py related
with usrp2, I get the “Import Error with usrp2” error.

(But when I try something *.py with usrp, it shows no error with usrp
library though it fails to work since no usrp is connected.)

I guess it fails to find the usrp2 library in the python code.

Can you guys help me with this error?

Young C. Park


#3

Yc Park schrieb:

Last week, I succeed to get a response from my usrp2.

After that, however, when I try usrp2_fft.py, or anything *.py related
with usrp2, I get the “Import Error with usrp2” error.

Make sure you have the right PYTHONPATH !

open a python shell,
$python

import sys
sys.path

The last command shows all Python Path your system knows.
Now search for the PATH to your modul .
And append this to your python code, with
sys.path.append(’/usr/lib/python2.5/site-packages/wx-2.6-gtk2-unicode’)
for example. Substitute the expression in the brackets through your
needed PATH.

The main Problem is mostly a misconfigured system/software.

Regards Markus


#4

Which version of GNU Radio are you using? USRP2 support isn’t in 3.1.3.

Kieran