Forum: GNU Radio Import Error with usrp2

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Yc P. (Guest)
on 2009-02-22 13:04
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
Shih-shen L. (Guest)
on 2009-03-02 09:04
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
Kieran B. (Guest)
on 2009-03-02 09:41
(Received via mailing list)
Which version of GNU Radio are you using? USRP2 support isn't in 3.1.3.

Kieran
Markus F. (Guest)
on 2009-03-02 20:05
(Received via mailing list)
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 <usrp2>.
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
This topic is locked and can not be replied to.