简体   繁体   English

尝试在 Windows 中使用 gnuradio/uhd 时出现 Python 错误

[英]Python error when trying to use gnuradio/uhd in Windows

I am trying to install UHD and gnuradio on Windows.我正在尝试在 Windows 上安装 UHD 和 gnuradio。 I can't find binary files for gnuradio, it looks like the link to their binary install is broken and the website is down.我找不到 gnuradio 的二进制文件,看起来他们的二进制安装的链接已损坏并且网站已关闭。 So I used gnuradio in Pothos Project.所以我在 Pothos Project 中使用了 gnuradio。 When I run my grc file in gnuradio, it runs correctly.当我在 gnuradio 中运行我的 grc 文件时,它运行正常。 However when I run it in command prompt I get this error:但是,当我在命令提示符下运行它时,出现此错误:

E:\Alireza\sdr_A20\4channel\recorder>recorder_grc.py
Traceback (most recent call last):
  File "E:\Alireza\sdr_A20\4channel\recorder\recorder_grc.py", line 12, in <module>
    from gnuradio import uhd
  File "E:\Program Files\PothosSDR\lib\python2.7\site-packages\gnuradio\uhd\__init__.py", line 135, in <module>
    _prepare_uhd_swig()
  File "E:\Program Files\PothosSDR\lib\python2.7\site-packages\gnuradio\uhd\__init__.py", line 38, in _prepare_uhd_swig
    import uhd_swig
  File "E:\Program Files\PothosSDR\lib\python2.7\site-packages\gnuradio\uhd\uhd_swig.py", line 17, in <module>
    _uhd_swig = swig_import_helper()
  File "E:\Program Files\PothosSDR\lib\python2.7\site-packages\gnuradio\uhd\uhd_swig.py", line 16, in swig_import_helper
    return importlib.import_module('_uhd_swig')
  File "E:\Python27\lib\importlib\__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named _uhd_swig

Anybody knows what can be wrong?有谁知道有什么问题? I thought it's a path issue but it looks like my PYTHONPATH is pointing to "E:\Program Files\PothosSDR\lib\python2.7\site-packages" which looks correct.我认为这是一个路径问题,但看起来我的 PYTHONPATH 指向看起来正确的“E:\Program Files\PothosSDR\lib\python2.7\site-packages”。 I also realized while I can perform import gnuradio in python, import uhd gives throws an import error.我还意识到,虽然我可以在 python 中执行import gnuradio ,但import uhd会引发导入错误。 But I am not sure how I can find it.但我不确定如何找到它。 Any help would be appreciated.任何帮助,将不胜感激。

Find where uhd.dll and _uhd_swig.pyd files are located and add the full directories paths to the PATH environment variable.找到uhd.dll_uhd_swig.pyd文件所在的位置,并将完整目录路径添加到PATH环境变量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 尝试执行 ./uhd_fft 时出现“ImportError no module named gnuradio” - “ImportError no module named gnuradio” when trying to execute ./uhd_fft 尝试在Windows上使用Python 3中的套接字时出现Winsock错误10014 - Winsock error 10014 when trying to use a socket in Python 3 on Windows 尝试使用python时终端中的Traceback错误 - Traceback error in terminal when trying to use python 尝试在Python中使用Twisted时导入错误 - Import error when trying to use Twisted in Python 尝试在 python 中使用 whois 但在 windows 中找不到文件错误 - Trying to use whois in python but getting file not found error in windows 如何在 Windows 上为“嵌入式 Python 块”打开 gnuradio 的预设编辑器? - How to open gnuradio's preset editor for "Embedded Python Blocks" on Windows? Windows错误:尝试在python中重命名文件时出现32 - Windows Error: 32 when trying to rename file in python 导入错误:尝试导入Python模块时,Windows 7上缺少DLL - Import Error: Missing DLL on Windows 7 when trying to import Python module 尝试在Python中重用Windows Notification类时出错 - Error when trying to reuse Windows Notification class in Python (gnuradio) 有没有办法可以使用“python 块”来制作源代码? - (gnuradio) Is there a way I can use "python block" to make a source?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM