简体   繁体   中英

Python error when trying to use gnuradio/uhd in Windows

I am trying to install UHD and gnuradio on Windows. I can't find binary files for gnuradio, it looks like the link to their binary install is broken and the website is down. So I used gnuradio in Pothos Project. When I run my grc file in gnuradio, it runs correctly. 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. I also realized while I can perform import gnuradio in python, import uhd gives throws an import error. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM