# No module named 'analog_swig' [duplicate]

I know guys you gonna tell me tat there is something wrong about GnuRadio or Pybombs installation. Well, this is my third time during the past 48 hours I reformat the OS of my mini pc fitlet2 mint linux and reinstall the the OS which is mint 19.1 cinamon and reinstall gnuradio using apt-get or even using Pybombs and get this problem when I try Python3 to run my .py file. Please, I am in real need for your help, again, I am a real beginner and try to learn. Here is how I installed Pybombs:

sudo apt-get install python3-pip
sudo apt-get install python3-setuptools
sudo pip3 install wheel
sudo apt-get install python3-setuptools
sudo pip3 install pybombs
pybombs auto-config
pybombs install gr-osmosdr
pip install analog


Later, I learned Kevin here on this community how to generate a python code from Gnuradion to run it through a python web server that I built based on simple script that I've found online. When I run it using python3 I get the "ModuleNotFoundError: No module named 'gnuradio'" error.

I know you may say something again about editing the PYTHONPATH file, and that is the other problem to be honest. I mean I am not sure what I am suppose to change aboutthe steup_env.sh file? Shouldn't be set and ready to go! If not, then please, guide me on how to do it.

This is my setup_env.sh file:

Update:

I just noticed that when I run 'Pybombs run gnuradio companion' the interface itself, it generated this error:

<<< Welcome to GNU Radio Companion 3.7.13.5 >>>

Block paths:

>>> Done

built-in source types: file osmosdr fcd rtl rtl_tcp uhd hackrf bladerf rfspace airspy soapy redpitaya
[0;32m[INFO] [UHD] [0;39mlinux; GNU C++ version 7.4.0; Boost_106501; UHD_3.15.0.git-16-gcad30dfe
Traceback (most recent call last):
main()
tb = top_block_cls()
self.osmosdr_source_0 = osmosdr.source( args="numchan=" + str(1) + " " + '' )
File "/home/fit-pc/gnuradio/lib/python2.7/dist-packages/osmosdr/osmosdr_swig.py", line 1170, in make
return _osmosdr_swig.source_make(*args, **kwargs)
RuntimeError: No supported devices found (check the connection and/or udev rules).


The other thing that I just noticed is when I run the Pybombs GR in the terminal it shows warnings "blocks already exist", but then the programs starts normally:

fit-pc@fitpc-fitlet2:~\$ pybombs run gnuradio-companion
PyBOMBS.ConfigManager - INFO - Prefix Python version is: 3.6.8
PyBOMBS - INFO - PyBOMBS Version 2.3.3
Warning: Block with key "analog_agc2_xx" already exists.
Warning: Block with key "analog_agc3_xx" already exists.
Warning: Block with key "analog_agc_xx" already exists.
Warning: Block with key "analog_am_demod_cf" already exists.
Warning: Block with key "analog_const_source_x" already exists.
..

..

..

..
Warning: Block with key "zeromq_sub_msg_source" already exists.
Warning: Block with key "zeromq_sub_source" already exists.
<<< Welcome to GNU Radio Companion 3.7.13.5 >>>

Block paths:

>>> Done


Update:

The "NO supported devices ..." error is fixed now after I run "/home/fit-pc/gnuradio/lib/uhd/utils/uhd_images_downloader.py", so the gnuradio gui/interface works and generates output normally with the usrp. But

But I still have the original error there which is "No module named 'analog_swig'" whenever I run python3 /home/fit-pc/Desktop/python-web-server/serv.py in the terminal.

Here i my original .grc file (the ID here is top_block and not Exercise_1 for demonstration purposes):

And to generate my python code to run it through the web server I had to remove the FFT sink, Multiply Const, and the Slider and run it as "No Gui" as I was instructed before:

My last Update:

If I run it using python2.7 in the Terminal I get this and nothing happens:

• GNU Radio 3.7 is not python3 compatible. As you can in fact easily see from your module paths, which contain python2.7. Jul 15 '19 at 7:56
• @MarcusMüller This is a little disappointing - are you aware if Python 3 migration is a work in progress? Jul 15 '19 at 8:30
• more than aware. As soon as I release GNU Radio 3.8, Python3 will be the preferred Python version, and with 3.9, we'll drop Python2 support, @flow2k. Jul 15 '19 at 9:30
• @MarcusMüller, Actually, to me, this is a real good news! At least I know that whatever I did was not wrong. Beside, I learned some good stuff while digging around this issue during the past a few days. Most important, I can move to my next phase in my GnuRadio training. I will take this as an answer to my posting. Thanks Marcus. Jul 15 '19 at 11:58
• You should really not be using pybombs at this point; mint should ship gnuradio and gnuradio-dev, and that's all you'd need for working GNU Radio. Jul 15 '19 at 12:11