1

我正在使用 Ubuntu 12.04 LTS。我曾多次尝试从 virtualenv 运行 ipython notebook。它不起作用,并显示以下错误消息:

    (ipython-notebook)gias@~/dev/virtualenvs/ipython-notebook$ ipython notebook
Traceback (most recent call last):
  File "/dev/virtualenvs/ipython-notebook/bin/ipython", line 8, in <module>
    load_entry_point('ipython==0.13.2', 'console_scripts', 'ipython')()
  File "/dev/virtualenvs/ipython-notebook/local/lib/python2.7/site-packages/IPython/frontend/terminal/ipapp.py", line 388, in launch_new_instance
    app.initialize()
  File "<string>", line 2, in initialize
  File "/dev/virtualenvs/ipython-notebook/local/lib/python2.7/site-packages/IPython/config/application.py", line 84, in catch_config_error
    return method(app, *args, **kwargs)
  File "/dev/virtualenvs/ipython-notebook/local/lib/python2.7/site-packages/IPython/frontend/terminal/ipapp.py", line 313, in initialize
    super(TerminalIPythonApp, self).initialize(argv)
  File "<string>", line 2, in initialize
  File "/dev/virtualenvs/ipython-notebook/local/lib/python2.7/site-packages/IPython/config/application.py", line 84, in catch_config_error
    return method(app, *args, **kwargs)
  File "/dev/virtualenvs/ipython-notebook/local/lib/python2.7/site-packages/IPython/core/application.py", line 325, in initialize
    self.parse_command_line(argv)
  File "/dev/virtualenvs/ipython-notebook/local/lib/python2.7/site-packages/IPython/frontend/terminal/ipapp.py", line 308, in parse_command_line
    return super(TerminalIPythonApp, self).parse_command_line(argv)
  File "<string>", line 2, in parse_command_line
  File "/dev/virtualenvs/ipython-notebook/local/lib/python2.7/site-packages/IPython/config/application.py", line 84, in catch_config_error
    return method(app, *args, **kwargs)
  File "/dev/virtualenvs/ipython-notebook/local/lib/python2.7/site-packages/IPython/config/application.py", line 420, in parse_command_line
    return self.initialize_subcommand(subc, subargv)
  File "<string>", line 2, in initialize_subcommand
  File "/dev/virtualenvs/ipython-notebook/local/lib/python2.7/site-packages/IPython/config/application.py", line 84, in catch_config_error
    return method(app, *args, **kwargs)
  File "/dev/virtualenvs/ipython-notebook/local/lib/python2.7/site-packages/IPython/config/application.py", line 352, in initialize_subcommand
    subapp = import_item(subapp)
  File "/dev/virtualenvs/ipython-notebook/local/lib/python2.7/site-packages/IPython/utils/importstring.py", line 40, in import_item
    module = __import__(package,fromlist=[obj])
  File "/dev/virtualenvs/ipython-notebook/local/lib/python2.7/site-packages/IPython/frontend/html/notebook/__init__.py", line 18, in <module>
    from IPython.zmq import check_for_zmq
  File "/virtualenvs/ipython-notebook/local/lib/python2.7/site-packages/IPython/zmq/__init__.py", line 67, in <module>
    check_for_zmq('2.1.4')
  File "/dev/virtualenvs/ipython-notebook/local/lib/python2.7/site-packages/IPython/zmq/__init__.py", line 53, in check_for_zmq
    raise ImportError("%s requires pyzmq >= %s"%(module, minimum_version))
ImportError: IPython.zmq requires pyzmq >= 2.1.4

这是当前的安装状态:

(ipython-notebook)gias@~/dev/virtualenvs/ipython-notebook$ pip freeze
argparse==1.2.1
ipython==0.13.2
nose==1.3.0
pyzmq==13.1.0
tornado==3.1
wsgiref==0.1.2

我做错什么了吗?

4

1 回答 1

2

对你有用import zmq吗?看起来你没有libzmq安装。

于 2013-08-02T04:02:57.603 回答