【问题标题】:ModuleNotFoundError : No module named 'gnuradio'ModuleNotFoundError:没有名为“gnuradio”的模块
【发布时间】:2020-06-06 01:58:14
【问题描述】:

我正在尝试在我的 ubuntu 20.02 上使用 https://github.com/rpp0/gr-lora 安装 gr-lora。我已经从安装部分成功安装了 docker 工具箱。但是然后尝试测试部分它有命令 $ ./lora_receive_file_nogui.py 基本上用于测试安装。当我运行该 .py 文件时,它显示错误“ModuleNotFoundError:没有名为 'gnuradio' 的模块。然后我尝试为 ubuntu 安装 gnuradio。其中一个消息来源还建议我使用 python 2.7 而不是 python 3。我试过了一切,但它仍然向我显示相同的错误。有人可以帮我解决这个问题吗?

【问题讨论】:

  • 您需要先安装正确版本的 GNU Radio,然后构建和安装依赖它的软件。此问题并非特定于 GNU Radio、docker 或 lora。

标签: python decoding gnuradio docker-toolbox lora


【解决方案1】:

当我运行该 .py 文件时,它显示错误“ModuleNotFoundError: no module named 'gnuradio'.

您需要在容器内而不是在您的主机中执行./lora_receive_file_nogui.py

我只是对其进行了几次测试,它主要按文档说明工作 - 有时在第一次运行时它不会解码任何内容,但在第二次运行时您收到的消息很少。这是我的一项测试的完整输出。

$ ./docker_run_grlora.sh 

[root@8c063de13ece apps]# ./lora_receive_file_nogui.py 
[?] Download test LoRa signal to decode? [y/N] y
[+] Downloading https://research.edm.uhasselt.be/probyns/lora/usrp-868.1-sf7-cr4-bw125-crc-0.sigmf-data -> ./example-trace.sigmf-data . . . . . . . . . . . . . . . . . .
[+] Downloading https://research.edm.uhasselt.be/probyns/lora/usrp-868.1-sf7-cr4-bw125-crc-0.sigmf-meta -> ./example-trace.sigmf-meta . .
[+] Configuration: 868.1 MHz, SF 7, CR 4/8, BW 125 kHz, prlen 8, crc on, implicit off
[+] Decoding. You should see a header, followed by 'deadbeef' and a CRC 5 times.
Bits (nominal) per symbol:  3.5
Bins per symbol:    128
Samples per symbol:     1024
Decimation:         8
/root/.gnuradio/prefs/vmcircbuf_default_factory: No such file or directory
vmcircbuf_createfilemapping: createfilemapping is not available
[+] Done
[root@8c063de13ece apps]# ./lora_receive_file_nogui.py 
[+] Skipping download.
[+] Configuration: 868.1 MHz, SF 7, CR 4/8, BW 125 kHz, prlen 8, crc on, implicit off
[+] Decoding. You should see a header, followed by 'deadbeef' and a CRC 5 times.
Bits (nominal) per symbol:  3.5
Bins per symbol:    128
Samples per symbol:     1024
Decimation:         8
 04 90 40 de ad be ef 70 0d
 04 90 40 de ad be ef 70 0d
 04 90 40 de ad be ef 70 0d
 04 90 40 de ad be ef 70 0d
 04 90 40 de ad be ef 70 0d
[+] Done
[root@8c063de13ece apps]# exit
exit

$ docker images rpp0/gr-lora
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
rpp0/gr-lora        latest              118b17c9b50d        2 years ago         2.56GB

【讨论】:

  • 非常感谢您帮助我。执行成功
猜你喜欢
  • 2019-03-28
  • 2022-01-07
  • 2017-12-14
  • 2020-12-10
  • 2021-09-02
  • 2020-10-10
  • 2022-01-06
  • 2021-09-10
相关资源
最近更新 更多