Page 1 of 1

GNURadio No module named _osmosdr_swig

Posted: Sat Apr 20, 2019 9:14 pm
by petec
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 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.

Re: GNURadio No module named _osmosdr_swig

Posted: Sat Apr 20, 2019 9:29 pm
by tim_rtd
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..

Re: GNURadio No module named _osmosdr_swig

Posted: Sun Apr 21, 2019 5:53 pm
by petec
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?

Re: GNURadio No module named _osmosdr_swig

Posted: Mon Apr 22, 2019 11:15 am
by tim_rtd
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 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.

Re: GNURadio No module named _osmosdr_swig

Posted: Mon Apr 22, 2019 9:50 pm
by petec
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?

Re: GNURadio No module named _osmosdr_swig

Posted: Thu Apr 25, 2019 8:40 pm
by tim_rtd
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.