GNU Radio 3.9+ uses Python 3 only, so the PYTHONPATH you are using will not work. A simple test for your PYTHONPATH is:
python3 -c "from gnuradio import gr ; print(gr.version()) ; print(gr.__file__)" If your path is set up correctly, this will show you the version and location of the GR python files. On Sat, Dec 18, 2021 at 6:59 AM sp h <[email protected]> wrote: > Hi, Before I installed Gnuradio from the binary package it works well. > In Ubuntu 20.04 when I want to build Gnuradio from source, it not > works... > Terminal, I received the following message: > > *Cannot import gnuradio.* > > *Is the python path environment variable set correctly? > > * > > > - All OS: PYTHONPATH* > - > - > > *Is the library path environment variable set correctly?* > > > - Linux: LD_LIBRARY_PATH* > - Windows: PATH* > - MacOSX: DYLD_LIBRARY_PATH* > > *I had set the path in .bashrc* > > export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/dist-packages > export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib > > *I had ldconfig after making Gnuradio Source* > > I saw all links but my problem is not solved. > > thanks in advance > > https://www.ruby-forum.com/t/cannot-import-gnuradio/245549 >
