首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >ImportError:没有名为“gnuradio”的模块

ImportError:没有名为“gnuradio”的模块
EN

Stack Overflow用户
提问于 2015-05-08 20:52:24
回答 1查看 4K关注 0票数 0

作为初学者,我正在尝试在Python无线电应用程序中进行编码。当我在编辑器中设置以下代码时(Eclipse)

代码语言:javascript
运行
复制
from gnuradio import gr
from gnuradio import audio, analog

class my_top_block(gr.top_block):
    def __init__(self):
        gr.top_block.__init__(self)

        sample_rate = 32000
        ampl = 0.1

        src0 = analog.sig_source_f(sample_rate, analog.GR_SIN_WAVE, 350, ampl)
        src1 = analog.sig_source_f(sample_rate, analog.GR_SIN_WAVE, 440, ampl)
        dst = audio.sink(sample_rate, "")
        self.connect(src0, (dst, 0))
        self.connect(src1, (dst, 1))

if __name__ == '__main__':
    try:
        my_top_block().run()
    except [[KeyboardInterrupt]]:
        pass

它显示了以下错误:

代码语言:javascript
运行
复制
   **from gnuradio import gr

ImportError: No module named 'gnuradio':**

有什么帮助会很感激的吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-05-09 20:59:06

安装gnuradio模块将解决@Padraic建议的问题。我搬回了我在Ubuntu的实验室,在那里我安装了gnuradio工作人员。使用gnuradio模块在Ubuntu上安装Eclipse,没有出现错误。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30132672

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档