2017-05-30 143 views
0

我已經安裝了zeroMQ,但是當我運行gr-ofdm的示例時,仍然存在「ImportError:No module named zmq」錯誤。ImportError:沒有名爲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 
------------------------------------------------------------------------------ 
+0

你可能已經安裝在你的Python解釋器'ØMQ'但你還沒有安裝'pyzmq'模塊。試試:'python -m pip install pyzmq' – zwer

+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 
相關問題