WVURAIL / gr-radio_astro

This package provides GNUradio OOT modules and grc flowgraphs that fascilates Radio Astronomy Observations with software defined radio devices.
37 stars 14 forks source link

Module not found #31

Closed kevinawilson closed 3 years ago

kevinawilson commented 3 years ago

I've installed radio_astro branch gr38 on a Raspberry Pi 4 with the PiSDR OS image. The GNU Radio version is 3.8.2 and the Python version is 3.7.3. When I attempt to run spectrometer_w_cal.grc from within gruradio-companion, I receive the following output:

Executing: /usr/bin/python3 -u /home/pi/Documents/gr-radio_astro/DSPIRA_Spectrometer.py

Traceback (most recent call last):
  File "/home/pi/Documents/gr-radio_astro/DSPIRA_Spectrometer.py", line 43, in <module>
    import radio_astro
ModuleNotFoundError: No module named 'radio_astro'

>>> Done (return code 1)

I'm sure there is a simple solution, but I haven't been able to find it. The blocks are showing up in gnuradio-companion, but they don't appear available via the import command from the generated Python script. The radio_astro modules seem to have been installed to /usr/local/include. I've tried adding this to PYTHONPATH, but to no avail. I also have /usr/local/lib/python3/dist-packages and /usr/local/lib/python3.7/dist-packages in the PYTHONPATH as instructed by the READme file. There is a radio_astro folder under /usr/local/lib/python3/dist-packages but not under /usr/local/lib/python3.7/dist-packages.

Any help would be greatly appreciated.

PranavSanghavi commented 3 years ago

So spectrometer_w_cal.grc relies on a ever so different code base. The installation and troubleshooting instruction for the gr-38 branch are here:

https://github.com/WVURAIL/gr-radio_astro/wiki/Installing-gr-radio_astro

i would recommend following this the difference might be subtle but this has been tested on this branch. Let me know if you still see errors.

kevinawilson commented 3 years ago

I had followed those instructions to install it, but it wasn't working. I eventually tweaked some settings and got it to work, but I'm not sure which did the trick. I also had to change some of the block settings in the program in GNU Radio, as they were throwing some Python errors because of the way choices in some GUI blocks were configured.

madelynnjm commented 3 years ago

I had followed those instructions to install it, but it wasn't working. I eventually tweaked some settings and got it to work, but I'm not sure which did the trick. I also had to change some of the block settings in the program in GNU Radio, as they were throwing some Python errors because of the way choices in some GUI blocks were configured.

Do you have any advice for what to tweak? I'm running into the exact same problem now.

PranavSanghavi commented 3 years ago

@mashgames2020 https://wvurail.org/dspira-lessons/gr_radio_astro_Installation a more updated set of instructions. Steps 10,11,12 are key. These work as of yesterday on ubuntu 20.04 and 21.04 Also after installing restart your terminal before launching gnuradio-companion.

Also please install from the gr-38 branch.

madelynnjm commented 3 years ago

Thank you so much! installing from the gr-38 branch was the solution I think.