简体   繁体   中英

unable to run ipython notebook, receive import errror

ipython itself works when i run it but when i run at the mac command prompt the following command i get a import error:

ipython notebook

below is the error:

    { $ipython notebook               
Traceback (most recent call last):
  File "/usr/local/bin/ipython", line 9, in <module>
    load_entry_point('ipython==3.1.0', 'console_scripts', 'ipython')()
  File "/Library/Python/2.7/site-packages/ipython-3.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-3.1.0-py2.7.egg/IPython/config/application.py", line 573, in launch_instance
    app.initialize(argv)
  File "<string>", line 2, in initialize
  File "/Library/Python/2.7/site-packages/ipython-3.1.0-py2.7.egg/IPython/config/application.py", line 75, in catch_config_error
    return method(app, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/ipython-3.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-3.1.0-py2.7.egg/IPython/config/application.py", line 75, in catch_config_error
    return method(app, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/ipython-3.1.0-py2.7.egg/IPython/core/application.py", line 369, in initialize
    self.parse_command_line(argv)
  File "/Library/Python/2.7/site-packages/ipython-3.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-3.1.0-py2.7.egg/IPython/config/application.py", line 75, in catch_config_error
    return method(app, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/ipython-3.1.0-py2.7.egg/IPython/config/application.py", line 471, 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-3.1.0-py2.7.egg/IPython/config/application.py", line 75, in catch_config_error
    return method(app, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/ipython-3.1.0-py2.7.egg/IPython/config/application.py", line 402, in initialize_subcommand
    subapp = import_item(subapp)
  File "/Library/Python/2.7/site-packages/ipython-3.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-3.1.0-py2.7.egg/IPython/html/notebookapp.py", line 30, in <module>
    check_for_zmq('13', 'IPython.html')
  File "/Library/Python/2.7/site-packages/ipython-3.1.0-py2.7.egg/IPython/utils/zmqrelated.py", line 12, in check_for_zmq
    raise ImportError("%s requires pyzmq >= %s"%(required_by, minimum_version))
ImportError: IPython.html requires pyzmq >= 13

i have ran conda update anaconda and i have updated ipython but the error persists. my end goal is just to open notebook via chrome.

update if i try to open notebook fro spyder this is what i get:

在此处输入图片说明

您需要更新pyzmq ,这与ipython分开:

sudo pip install -U pyzmq 

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