GNURadio No module named _osmosdr_swig

Need help installing or figuring out something about your SDR? Ask here.
Post Reply
petec
Posts: 9
Joined: Mon Jan 14, 2019 4:40 pm
Location: Nashville TN

GNURadio No module named _osmosdr_swig

Post by petec » Sat Apr 20, 2019 9:14 pm

Well, for the last few hours, when trying to run a flow graph in GNC, I have been trying to resolve the error:
"ImportError: No module named osmosdr"

After countless attempts many searches I found one that said to reinstall gr-osmosdr from osmocom.org. Guess what, no more:
"ImportError: No module named osmosdr"
Now it is:
"ImportError: No module named _osmosdr_swig"

All of the searches take me to things I tried with the first error.
I have no where to go now.

I'm running a RPi 3.

tim_rtd
Posts: 90
Joined: Fri Jun 30, 2017 11:34 am

Re: GNURadio No module named _osmosdr_swig

Post by tim_rtd » Sat Apr 20, 2019 9:29 pm

Did you compile gnuradio on the Pi ?
I've recently seen something like that... I believe it was caused by not having swig installed at the beginning on the build process. It let me get quite far before seeing the swig error. It may have been during a compiling gr- file..

petec
Posts: 9
Joined: Mon Jan 14, 2019 4:40 pm
Location: Nashville TN

Re: GNURadio No module named _osmosdr_swig

Post by petec » Sun Apr 21, 2019 5:53 pm

Yes I did compile gnuradio on the Pi.
I didn't notice any errors.

Do you think I should uninstall GNURadio and osmosdr and try again?

I normally would have by now but gr-osmosdr says "make uninstall" first.
I tried typing "make uninstall" in the home/pi/gr-osmosdr directory but I get:
make: *** No rule to make target 'uninstall'. Stop.

I did find some posts about the same problem and it was tracked down to a version of osmosdr installed by microchip.
I don't have that problem but I have been trying a lot of rtl-sdr "stuff" like Sharp, Soapy, ....who knows what else.
One of them may have installed a special version of gr-osmosdr and now things are tangled up.

What do you think?

tim_rtd
Posts: 90
Joined: Fri Jun 30, 2017 11:34 am

Re: GNURadio No module named _osmosdr_swig

Post by tim_rtd » Mon Apr 22, 2019 11:15 am

Do the uninstall in the /build directory.

LoL, when I said I saw that recently saw that swig error it was very recent. I'm trying to get plutosdr to run on gnuradio on the Tinker board. I got thru the swig error...as I said before by rebuilding the module......I think gnuradio itself was ok. In fact once installed thru the package manager. All looks well, but gnuradio does not appear to connect to the plutosdr.. I do have this running on multiple builds desktops based on Ubuntu.

petec
Posts: 9
Joined: Mon Jan 14, 2019 4:40 pm
Location: Nashville TN

Re: GNURadio No module named _osmosdr_swig

Post by petec » Mon Apr 22, 2019 9:50 pm

I'm new to Linux....very new.
So, do you think I should uninstall gr-osmosdr?
Can I do it using apt-get?
If I need to use make uninstall I hope I can find the build directory.

What do you think about doing a clean slate and get rid of everything I tried that used an SDR?

tim_rtd
Posts: 90
Joined: Fri Jun 30, 2017 11:34 am

Re: GNURadio No module named _osmosdr_swig

Post by tim_rtd » Thu Apr 25, 2019 8:40 pm

You can try the apt-get remove and if it doesn't work, then re-compile again, use the cmake ../
After you do the full build, go back into the /build directory and do the sudo make uninstall.

Post Reply