zoukankan      html  css  js  c++  java
  • pyzmq missing when running ipython notebook

    Q:

    I can run iPython, but when I try to initiate a notebook I get the following error:

    ~  ipython notebook                   
    Traceback (most recent call last):
      File "/usr/local/bin/ipython", line 8, in <module>
        load_entry_point('ipython==2.1.0', 'console_scripts', 'ipython')()
      File "/Library/Python/2.7/site-packages/ipython-2.1.0-py2.7.egg/IPython/__init__.py", line 120, in start_ipython
        return launch_new_instance(argv=argv, **kwargs)
      File "/Library/Python/2.7/site-packages/ipython-2.1.0-py2.7.egg/IPython/config/application.py", line 563, in launch_instance
        app.initialize(argv)
      File "<string>", line 2, in initialize
      File "/Library/Python/2.7/site-packages/ipython-2.1.0-py2.7.egg/IPython/config/application.py", line 92, in catch_config_error
        return method(app, *args, **kwargs)
      File "/Library/Python/2.7/site-packages/ipython-2.1.0-py2.7.egg/IPython/terminal/ipapp.py", line 321, in initialize
        super(TerminalIPythonApp, self).initialize(argv)
      File "<string>", line 2, in initialize
      File "/Library/Python/2.7/site-packages/ipython-2.1.0-py2.7.egg/IPython/config/application.py", line 92, in catch_config_error
        return method(app, *args, **kwargs)
      File "/Library/Python/2.7/site-packages/ipython-2.1.0-py2.7.egg/IPython/core/application.py", line 381, in initialize
        self.parse_command_line(argv)
      File "/Library/Python/2.7/site-packages/ipython-2.1.0-py2.7.egg/IPython/terminal/ipapp.py", line 316, in parse_command_line
        return super(TerminalIPythonApp, self).parse_command_line(argv)
      File "<string>", line 2, in parse_command_line
      File "/Library/Python/2.7/site-packages/ipython-2.1.0-py2.7.egg/IPython/config/application.py", line 92, in catch_config_error
        return method(app, *args, **kwargs)
      File "/Library/Python/2.7/site-packages/ipython-2.1.0-py2.7.egg/IPython/config/application.py", line 475, in parse_command_line
        return self.initialize_subcommand(subc, subargv)
      File "<string>", line 2, in initialize_subcommand
      File "/Library/Python/2.7/site-packages/ipython-2.1.0-py2.7.egg/IPython/config/application.py", line 92, in catch_config_error
        return method(app, *args, **kwargs)
      File "/Library/Python/2.7/site-packages/ipython-2.1.0-py2.7.egg/IPython/config/application.py", line 406, in initialize_subcommand
        subapp = import_item(subapp)
      File "/Library/Python/2.7/site-packages/ipython-2.1.0-py2.7.egg/IPython/utils/importstring.py", line 42, in import_item
        module = __import__(package, fromlist=[obj])
      File "/Library/Python/2.7/site-packages/ipython-2.1.0-py2.7.egg/IPython/html/notebookapp.py", line 39, in <module>
        check_for_zmq('2.1.11', 'IPython.html')
      File "/Library/Python/2.7/site-packages/ipython-2.1.0-py2.7.egg/IPython/utils/zmqrelated.py", line 37, in check_for_zmq
        raise ImportError("%s requires pyzmq >= %s"%(required_by, minimum_version))
    ImportError: IPython.html requires pyzmq >= 2.1.11

    But as far as I can see, I already have the pyzmq package installed.

    ~ pip install pyzmq            
    Requirement already satisfied (use --upgrade to upgrade): pyzmq in /Library/Python/2.7/site-packages/pyzmq-14.3.1-py2.7-macosx-10.6-intel.egg
    Cleaning up...

    A:

    Arg. The ipython install is a little idiosyncratic. Here's what I had to do to resolve this:

    $ pip uninstall ipython
    $ pip install ipython[all]

    The issue is that notebooks have their own set of dependencies, which aren't installed with pip install ipython. However, having installed ipython, pip doesn't see the need to add anything if you then try the [all] form.

    参考:

    http://stackoverflow.com/questions/24995438/pyzmq-missing-when-running-ipython-notebook

  • 相关阅读:
    你能用多长时间停车?
    中国威胁论好像还挺严重的
    热爱生命
    lunix下shell脚本批量获取文件,批量修改文件内容
    sql数据操作的若干心得(二)向表中自动插入自增的ID
    Asp.net开发之旅动态产生控件
    Asp.net开发之旅GridView中嵌入DropDownList的一点心得
    Asp.net开发之旅开发环境
    Asp.net开发之旅简单的引用母版页
    Sql数据操作的若干心得
  • 原文地址:https://www.cnblogs.com/xiaotengyi/p/4082641.html
Copyright © 2011-2022 走看看