I'm having some issues using gnuradio with python programs. I am trying to use gnuradio with gr-satellites' python programs to decode packets from CubeSats. When I try to run the command python filename.py
, I receive the following output
Traceback (most recent call last):
File "taurus1_telemetry_parser.py", line 23, in <module>
from gnuradio import gr
File "/usr/local/lib/python3/dist-packages/gnuradio/gr/__init__.py", line 39, in <module>
from .runtime_swig import *
File "/usr/local/lib/python3/dist-packages/gnuradio/gr/runtime_swig.py", line 117
def value(self) -> "PyObject *":
^
SyntaxError: invalid syntax
(BELOW COMMENTS EDITED FROM ORIGINAL POST)
It turns out that my system was set up to run python 2.7.15, when gnuradio runs python3. I adjusted my system so that it ran off of python 3.6.8, based on the instructions posted here. This changed my system to run python3.6.8 correctly, but I think I have installed gnuradio incorrectly, as I am still getting errors.
Now, if I run the command python3 filename.py
I get the following output:
Traceback (most recent call last):
File "taurus1_telemetry_parser.py", line 26, in <module>
from . import by701_telemetry
ImportError: cannot import name 'by701_telemetry'
I successfully uninstalled the pybombs version of gnuradio using the command pybombs remove gnuradio uhd
, as was suggested in the comments below, leaving only the ppa version installed.
Since there were so many issues with the gnuradio config, I tried to see if I could easily uninstall the ppa version and just start fresh with gnuradio. I went into my directory for gnuradio (Desktop/gnuradio/build) and tried a make uninstall
. Doing a make uninstall
process did not produce any errors, but this did not seem to remove gnuradio from my system entirely.
gnuradio can still be found in /usr/local/lib/python3/dist-packages
, and I still get the ImportError when I try to run a python script. However, now when I enter head /usr/local/bin/gnuradio-companion
, I get the following message:
head: cannot open '/usr/local/bin/gnuradio-companion' for reading: No such file or directory
The output of which gnuradio-companion
is:
/usr/bin/gnuradio-companion
I'm kind of lost on what to do here now. Any ideas on how gnuradio can either be fixed or uninstalled entirely?