Can't get GNU Radio/PlutoSDR and gqrx/PlutoSDR to both work on Ubuntu

I can install GNU Radio as described here and make it work with the Pluto SDR.

https://wiki.analog.com/resources/tools-software/linux-software/gnuradio#using_the_plutosdr_blocks

I can install gqrx as described here and make it work with the Pluto SDR.

https://gqrx.dk/download/install-ubuntu

However, the gqrx installation breaks the GNU Radio installation.

GNU Radio complains:

ImportError: No module named _iio_swig

What do I need to do to have both apps working?

  • 0
    •  Analog Employees 
    on Feb 27, 2020 8:07 PM

    You need to make sure the generated swig interface (_iio_swig) is on your python path. This is described in the installation instructions of your first link: https://wiki.analog.com/resources/tools-software/linux-software/gnuradio#compiling_the_gr-iio_blocks_for_your_pc

    -Travis

  • Hi,

    I'm trying the same thing. GNU is installed but gr-iio is making problem on my ubuntu PC. here is the error log.

    Workstation:~/gr-iio$ make -j10
    [  2%] Swig source iio_pluto_source_swig.i
    [  5%] Swig source iio_pluto_sink_swig.i
    [  7%] Swig source iio_swig.i
    [ 63%] Built target gnuradio-iio
    [ 68%] Built target pygen_python_iio_971da
    /home/athar/gr-iio/swig/iio_pluto_sink_swig.i/home/athar/gr-iio/swig/iio_swig.i::85:/home/athar/gr-iio/swig/iio_pluto_source_swig.i:  E:rEr8or:rr o:E rrU:rn oaUbrnl:ea  bUtlone a fbtilone d f ti'ongnuradio.i 'df
     i'ngnuradio.id' 
    'gnuradio.i'
    swig/CMakeFiles/iio_pluto_source_swig_swig_compilation.dir/build.make:78: recipe for target 'swig/CMakeFiles/iio_pluto_source_swig.dir/iio_pluto_source_swigPYTHON.stamp' failed
    make[2]: *** [swig/CMakeFiles/iio_pluto_source_swig.dir/iio_pluto_source_swigPYTHON.stamp] Error 1
    make[2]: *** Deleting file 'swig/CMakeFiles/iio_pluto_source_swig.dir/iio_pluto_source_swigPYTHON.stamp'
    swig/CMakeFiles/iio_pluto_sink_swig_swig_compilation.dir/build.make:78: recipe for target 'swig/CMakeFiles/iio_pluto_sink_swig.dir/iio_pluto_sink_swigPYTHON.stamp' failed
    make[2]: *** [swig/CMakeFiles/iio_pluto_sink_swig.dir/iio_pluto_sink_swigPYTHON.stamp] Error 1
    make[2]: *** Deleting file 'swig/CMakeFiles/iio_pluto_sink_swig.dir/iio_pluto_sink_swigPYTHON.stamp'
    CMakeFiles/Makefile2:345: recipe for target 'swig/CMakeFiles/iio_pluto_source_swig_swig_compilation.dir/all' failed
    make[1]: *** [swig/CMakeFiles/iio_pluto_source_swig_swig_compilation.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs....
    CMakeFiles/Makefile2:454: recipe for target 'swig/CMakeFiles/iio_pluto_sink_swig_swig_compilation.dir/all' failed
    make[1]: *** [swig/CMakeFiles/iio_pluto_sink_swig_swig_compilation.dir/all] Error 2
    swig/CMakeFiles/iio_swig_swig_compilation.dir/build.make:78: recipe for target 'swig/CMakeFiles/iio_swig.dir/iio_swigPYTHON.stamp' failed
    make[2]: *** [swig/CMakeFiles/iio_swig.dir/iio_swigPYTHON.stamp] Error 1
    make[2]: *** Deleting file 'swig/CMakeFiles/iio_swig.dir/iio_swigPYTHON.stamp'
    CMakeFiles/Makefile2:427: recipe for target 'swig/CMakeFiles/iio_swig_swig_compilation.dir/all' failed
    make[1]: *** [swig/CMakeFiles/iio_swig_swig_compilation.dir/all] Error 2
    Makefile:146: recipe for target 'all' failed
    make: *** [all] Error 2
    

    I'm stuck with this error. Can you help?

  • 0
    •  Analog Employees 
    on Apr 6, 2020 2:28 PM in reply to Rocky2018

    What version of gnuradio are you using? What branch of gr-iio are you using?

    -Travis

  • I'm using gnuradio3.8.1.0 (Python 3.6.9). I solved installation problem by https://ez.analog.com/adieducation/university-program/f/q-a/117130/gr-iio-update-for-gnuradio-3-8-x.

    Now i'm facing iio module problem. My grc file execution gives error 

    Traceback (most recent call last):
    File "/media/usr/GNU_radio/new.py", line 32, in <module>
    import iio
    ModuleNotFoundError: No module named 'iio'

    This error is discussed here 

    https://ez.analog.com/linux-software-drivers/f/q-a/141281/error-in-python-with-import-adi/365592

    I tried the recommended solution by re building and installing libiio using using cmake -DPYTHON_BINDINGS=ON ..that went successfully. But still problem is not resolved. 

    P.S. Should i make another thread or continue on this?

  • +1
    •  Analog Employees 
    on Apr 7, 2020 12:22 PM in reply to Rocky2018

    Reinstalling libiio after gr-iio will likely break gr-iio since they share the same module name in python(iio). Do not use the libiio python bindings with gr-iio.

    After you install gr-iio make sure the generate swig module (folder named iio) is on your python path.

    -Travis