analogdevicesinc / gr-iio

IIO blocks for GNU Radio
GNU General Public License v3.0
94 stars 62 forks source link

Fail to run Pluto with Gnuradio #37

Closed alexanderthefox closed 5 years ago

alexanderthefox commented 5 years ago

Hello!

I installed gnuradio and the iio-blocks which are described at https://wiki.analog.com/resources/tools-software/linux-software/gnuradio on my ubuntu 18.04.01. After loading the fmradio_pluto.grc I tried to run it. But I received the following message: Loading: "/home/alexander/gr-iio/iio-examples/fmradio_pluto.grc"

Done

Generating: '/home/alexander/gr-iio/iio-examples/top_block.py'

Generating: '/home/alexander/gr-iio/iio-examples/top_block.py'

Executing: /usr/bin/python -u /home/alexander/gr-iio/iio-examples/top_block.py

Traceback (most recent call last): File "/home/alexander/gr-iio/iio-examples/top_block.py", line 15, in from gnuradio import iio ImportError: cannot import name iio

Pls, can someone explain to me, what went wrong an how I could overcome that problem.

Looking forward to hearing from you.

Thx Alexander

alexanderthefox commented 5 years ago

Hi,

I already overcome the top mentioned problem by using cmake -DCMAKE_INSTALL_PREFIX=/usr .

but unfort. after that, I received still the notification that no module named iio_swig could be imported. From that point on I thought I have to move the blocks with: cp -r /usr/local/lib/python2.7/dist-packages/gnuradio/iio /usr/lib/python2.7/dist-packages/gnuradio/

but that didn't changed anything. I still get from GNUradio:

Generating: '/home/alexander/gr-iio/iio-examples/top_block.py'

Executing: /usr/bin/python -u /home/alexander/gr-iio/iio-examples/top_block.py

Traceback (most recent call last): File "/home/alexander/gr-iio/iio-examples/top_block.py", line 15, in from gnuradio import iio File "/usr/lib/python2.7/dist-packages/gnuradio/iio/init.py", line 35, in from iio_swig import * ImportError: No module named iio_swig

Done (return code 1)

I'm absolutely new to Linux. Because of that I'm not familiar what I can do to run GNU radio with the pluto blocks right now...

It would be great to get any help to solve the problem.

Thanks in advance. Alexander

I followed the installation guide from here: [https://wiki.analog.com/resources/tools-software/linux-software/gnuradio]

mhennerich commented 5 years ago

Did you build and install libiio?

alexanderthefox commented 5 years ago

Yes, I build and installed libiio. Is there a way to check if the installation of libiio was ok?

tfcollins commented 5 years ago

There can be a namespace issue sometimes with apt installs of gnuradio. Please read the last section here: https://wiki.analog.com/resources/tools-software/linux-software/gnuradio#compiling_the_gr-iio_blocks_for_your_pc

alexanderthefox commented 5 years ago

Tfcollins, I' m not quite sure if I understand you? I am using Ubuntu 18.04.1 not Windows. I followed exactly the mentioned installation guide you linked.

tfcollins commented 5 years ago

Sorry, missed that you copied things to /usr/lib as suggested. Do you have swig installed?

alexanderthefox commented 5 years ago

tfcollins,

I checked with swig - version if a swig version is installed - I got no answer. So I installed swig with sudo apt install swig. Now I have swig 3.0 (3.0.12-1) installed.

After that I started GNURadio again. But I get still the failure File "/usr/lib/python2.7/dist-packages/gnuradio/iio/init.py", line 35, in from iio_swig import * ImportError: No module named iio_swig

Even after I reboot the system and started Gnuradio again, I got the same failure notice.

Should I delete libiio, libad9361-iio and gr-iio and install/compile them again? If so, how I must do that?

I'm a bit lost - what else can I do?

mhennerich commented 5 years ago

You need install and build things in the proper order. So now go back an rebuild libiio

alexanderthefox commented 5 years ago

Mhennerich,

should I only reinstall libiio? Is it neccessary to delet the current installed libiio or can I just compile libiio ?

tfcollins commented 5 years ago

If you didn't have swig when you built gr-iio, then it didn't build the python blocks. Rebuilding gr-iio should be enough.

alexanderthefox commented 5 years ago

Tfcollins,

ok. Thanks for your help.

Just compiling again without removing before building, right?

alexanderthefox commented 5 years ago

@all: Many thx for your help. Gnuradio is now running with pluto!