# ModuleNotFoundError: No module named 'limesdr'

**URL:** https://discourse.myriadrf.org/t/modulenotfounderror-no-module-named-limesdr/5561
**Category:** LimeSDR
**Created:** [1 January 2020 21:31 UTC](https://discourse.myriadrf.org/t/modulenotfounderror-no-module-named-limesdr/5561 "2020-01-01T21:31:56Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![gcormier](https://avatars.discourse-cdn.com/v4/letter/g/f9ae1b/32.png) [@gcormier](https://discourse.myriadrf.org/u/gcormier)
#### Post date: [1 January 2020 21:31 UTC](https://discourse.myriadrf.org/t/modulenotfounderror-no-module-named-limesdr/5561/1 "2020-01-01T21:31:56Z")

</div>

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.

```auto
-- 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.

```auto
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.

>>> 

```

---

<div class="post-metadata">

### Author: ![andrewback](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@andrewback](https://discourse.myriadrf.org/u/andrewback)
#### Post date: [2 January 2020 10:31 UTC](https://discourse.myriadrf.org/t/modulenotfounderror-no-module-named-limesdr/5561/2 "2020-01-02T10:31:05Z")

</div>

One for @Garmus.

---

<div class="post-metadata">

### Author: ![vvvelichkov](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/vvvelichkov/32/2844_2.png) [@vvvelichkov](https://discourse.myriadrf.org/u/vvvelichkov)
#### Post date: [3 January 2020 15:29 UTC](https://discourse.myriadrf.org/t/modulenotfounderror-no-module-named-limesdr/5561/3 "2020-01-03T15:29:59Z")

</div>

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

```auto
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.

---

<div class="post-metadata">

### Author: ![gcormier](https://avatars.discourse-cdn.com/v4/letter/g/f9ae1b/32.png) [@gcormier](https://discourse.myriadrf.org/u/gcormier)
#### Post date: [6 January 2020 00:32 UTC](https://discourse.myriadrf.org/t/modulenotfounderror-no-module-named-limesdr/5561/4 "2020-01-06T00:32:00Z")

</div>

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](https://canada1.discourse-cdn.com/flex034/uploads/myriadrf/original/2X/d/d6f8009db91422e9460b16f6765b42e9fd538a95.png)  
 ![image](https://canada1.discourse-cdn.com/flex034/uploads/myriadrf/original/2X/8/81640f41bf291fa2ab2a78db022f55f19efa559d.png)  
 ![image](https://canada1.discourse-cdn.com/flex034/uploads/myriadrf/original/2X/5/544dfe95a914c1197b0b1f309cd40c84f9758f1e.png)

```auto
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.

---

<div class="post-metadata">

### Author: ![andrewback](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@andrewback](https://discourse.myriadrf.org/u/andrewback)
#### Post date: [6 January 2020 09:52 UTC](https://discourse.myriadrf.org/t/modulenotfounderror-no-module-named-limesdr/5561/5 "2020-01-06T09:52:47Z")

</div>

Would suggest you start by running up the provided examples:

> **[myriadrf/gr-limesdr](https://github.com/myriadrf/gr-limesdr/tree/master/examples)**
>
> gr-limesdr Plugin for GNURadio. Contribute to myriadrf/gr-limesdr development by creating an account on GitHub.

---

<div class="post-metadata">

### Author: ![gcormier](https://avatars.discourse-cdn.com/v4/letter/g/f9ae1b/32.png) [@gcormier](https://discourse.myriadrf.org/u/gcormier)
#### Post date: [6 January 2020 15:10 UTC](https://discourse.myriadrf.org/t/modulenotfounderror-no-module-named-limesdr/5561/6 "2020-01-06T15:10:25Z")

</div>

That gets me going! Thanks 🙂

---

<div class="post-metadata">

### Author: ![iandiver](https://avatars.discourse-cdn.com/v4/letter/i/e9a140/32.png) [@iandiver](https://discourse.myriadrf.org/u/iandiver)
#### Post date: [6 March 2024 16:51 UTC](https://discourse.myriadrf.org/t/modulenotfounderror-no-module-named-limesdr/5561/7 "2024-03-06T16:51:46Z")

</div>

I received LimeSDR Mini 2.0 yesterday. I’m trying to use the FM receiver example as a simple test. The LimeSDR Quick Test is working just fine. I wanted to try GNU Radio 3.8 on Ubuntu 18.04 (I know this is old, but I want to try OpenAir Interface and instructions refer to this version). I have built everything from source including gr-limesdr for version 3.8. Everything is built but I am obviously missing something as I get the ModuleNotFoundError: No module named ‘limesdr’ error. I exported the PYTHONPATH as above, but still the error occurs. I assume I am simply missing this limesdr module somehow, but I don’t know where it comes from? Do you have any hints?

---

<div class="post-metadata">

### Author: ![iandiver](https://avatars.discourse-cdn.com/v4/letter/i/e9a140/32.png) [@iandiver](https://discourse.myriadrf.org/u/iandiver)
#### Post date: [7 March 2024 03:02 UTC](https://discourse.myriadrf.org/t/modulenotfounderror-no-module-named-limesdr/5561/8 "2024-03-07T03:02:42Z")

</div>

After many attempts I found that the limesdr module was in the following locations (using sudo find / -name limesdr):

/usr/lib/python2.7/dist-packages/limesdr  
/usr/local/lib/python3/dist-packages/limesdr  
/usr/local/lib/python2.7/dist-packages/limesdr

whereas the instructions at [LinuxInstall - GNU Radio](https://wiki.gnuradio.org/index.php?title=LinuxInstall#For_Ubuntu_18.04) suggest it should be at:

usr/local/lib/python2.7/site-packages

The solution was to change these lines in the instructions from:

- `echo 'export PYTHONPATH=/usr/local/lib/python3/dist-packages:usr/local/lib/python2.7/site-packages:$PYTHONPATH' >> ~/.bashrc`

- `echo 'export PYTHONPATH=/usr/local/lib/python3/dist-packages:usr/local/lib/python2.7/site-packages:$PYTHONPATH' >> ~/.profile`

to:

- `echo 'export PYTHONPATH=/usr/local/lib/python3/dist-packages:usr/local/lib/python2.7/dist-packages:$PYTHONPATH' >> ~/.bashrc`

- `echo 'export PYTHONPATH=/usr/local/lib/python3/dist-packages:usr/local/lib/python2.7/dist-packages:$PYTHONPATH' >> ~/.profile`

Having got past this issue I am now able to run the FM receiver example in GNURadio. Now I am trying to figure why I cannot hear any sound output.

---

<div class="post-metadata">

### Author: ![RightHalfPlane](https://avatars.discourse-cdn.com/v4/letter/r/46a35a/32.png) [@RightHalfPlane](https://discourse.myriadrf.org/u/RightHalfPlane)
#### Post date: [7 March 2024 04:58 UTC](https://discourse.myriadrf.org/t/modulenotfounderror-no-module-named-limesdr/5561/9 "2024-03-07T04:58:04Z")

</div>

Many programs use the default antenna of “NONE” - So you hear nothing - antenna needs to be set to "LNAW’ to get output.

---

<div class="post-metadata">

### Author: ![iandiver](https://avatars.discourse-cdn.com/v4/letter/i/e9a140/32.png) [@iandiver](https://discourse.myriadrf.org/u/iandiver)
#### Post date: [11 March 2024 18:52 UTC](https://discourse.myriadrf.org/t/modulenotfounderror-no-module-named-limesdr/5561/10 "2024-03-11T18:52:16Z")

</div>

Thanks for the hint. It turns out that I did not have the VCO enabled (Lime Suite GUI by default has checkbox for VCO checked under Power Down Controls in top left of SXR tab). After changing this it started working.
