ImportError:没有名为zmq的模块

时间:2017-05-30 00:02:17

标签: zeromq

我已经安装了zeroMQ,但是当我运行gr-ofdm的例子时,仍然存在“ImportError:No module named zmq”错误。

./run_benchmark_gui.sh 
------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/zhenyu/gr-ofdm/gr-ofdm/apps/gui/ofdm_tx_gui.py", line 28, in <module>
    from gnuradio import zeromq
  File "/usr/local/lib/python2.7/dist-packages/gnuradio/zeromq/__init__.py", line 35, in <module>
    from probe_manager import probe_manager
  File "/usr/local/lib/python2.7/dist-packages/gnuradio/zeromq/probe_manager.py", line 22, in <module>
    import zmq
ImportError: No module named zmq
Traceback (most recent call last):
  File "/home/zhenyu/gr-ofdm/gr-ofdm/apps/gui/ofdm_rx_gui.py", line 28, in <module>
    from gnuradio import zeromq
  File "/usr/local/lib/python2.7/dist-packages/gnuradio/zeromq/__init__.py", line 35, in <module>
    from probe_manager import probe_manager
  File "/usr/local/lib/python2.7/dist-packages/gnuradio/zeromq/probe_manager.py", line 22, in <module>
    import zmq
ImportError: No module named zmq
Traceback (most recent call last):
  File "/home/zhenyu/gr-ofdm/gr-ofdm/apps/../python/ofdm/benchmark_ofdm.py", line 23, in <module>
    from gnuradio import gr, blocks, analog, zeromq
  File "/usr/local/lib/python2.7/dist-packages/gnuradio/zeromq/__init__.py", line 35, in <module>
    from probe_manager import probe_manager
  File "/usr/local/lib/python2.7/dist-packages/gnuradio/zeromq/probe_manager.py", line 22, in <module>
    import zmq
ImportError: No module named zmq
------------------------------------------------------------------------------

1 个答案:

答案 0 :(得分:0)

您可以尝试使用以下命令:

sudo wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py

sudo /usr/local/bin/python2.7 ez_setup.py

sudo /usr/local/bin/easy_install-2.7 zmq