ModuleNotFoundError: No module named 'limesdr'

I’ve got GnuRadio 3.8 installed from the PPA on Ubuntun 18.04LTS, and I’ve just compiled and installed the 3.8 branch of limesdr.

When trying to run a simple LimeSDR source into audio output, I get this error:

ModuleNotFoundError: No module named ‘limesdr’

I can see when I run make install that it is picking up and installing to python3.

-- Up-to-date: /usr/local/lib/python3/dist-packages/limesdr/_limesdr_swig.so
-- Up-to-date: /usr/local/lib/python3/dist-packages/limesdr/limesdr_swig.py
-- Up-to-date: /usr/local/lib/python3/dist-packages/limesdr/limesdr_swig.pyc
-- Up-to-date: /usr/local/lib/python3/dist-packages/limesdr/limesdr_swig.pyo
-- Up-to-date: /usr/local/include/limesdr/limesdr/swig/limesdr_swig.i
-- Up-to-date: /usr/local/include/limesdr/limesdr/swig/limesdr_swig_doc.i
-- Up-to-date: /usr/local/lib/python3/dist-packages/limesdr/__init__.py
-- Up-to-date: /usr/local/lib/python3/dist-packages/limesdr/__init__.pyc
-- Up-to-date: /usr/local/lib/python3/dist-packages/limesdr/__init__.pyo
-- Up-to-date: /usr/local/share/gnuradio/grc/blocks/limesdr_source.block.yml
-- Up-to-date: /usr/local/share/gnuradio/grc/blocks/limesdr_sink.block.yml

However, running it manually confirms no library present, and listing the modules in Python3 I can’t see any limesdr module.

Python 3.6.9 (default, Nov  7 2019, 10:44:02) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> help("modules lime")

Here is a list of modules whose name or summary contains 'lime'.
If there are any, enter a module name to get more help.

>>> 

One for @Garmus.

Hi @gcormier,

You need to add /usr/local/lib/python3/dist-packages/ to the PYTHONPATH environment variable. In a terminal execute the following command and then from the same terminal start gnuradio companion

export PYTHONPATH=/usr/local/lib/python3/dist-packages/:$PYTHONPATH
gnuradio-companion

You could also add the export line to your ~/.bash_profile or ~/.bashrc and then logout and login.

1 Like

Thanks, that resolved the issue!

Next issue, I have a very simple LimeSDR source. samp_rate at 32k, frequency set to 106M (or 106e6, no difference), into a simple WBFM Receive and Audio Sink module. The values in the LimeSDR modules are the defaults otherwise.

image
image
image

LimeSuite version: 19.04.0-myriadrf1~bionic
gr-limesdr version: 3.0.0.0
##################
Device list:
Nr.:0 device:LimeSDR Mini, media=USB 3.0, module=FT601, addr=24607:1027, serial=...
##################
Reference clock 40.00 MHz
Using device: LimeSDR-Mini(...) GW: 1.30 FW: 6
##################

INFO: device_handler::enable_channels(): SISO CH0 set for device number 0.
INFO: device_handler::set_samp_rate(): SetFrequencyCGEN(4.096 MHz) - cannot deliver requested frequency

>>> Done (return code -11)

I’m not sure where it’s picking up 4.096MHz from nor why it’s failing.

Would suggest you start by running up the provided examples:

1 Like

That gets me going! Thanks :slight_smile:

1 Like