2015-05-12 119 views
1

IPython中,當我運行它,但是當我在mac命令運行提示如下命令我得到一個導入錯誤本身的工作原理:無法運行IPython的筆記本電腦,收到進口errror

ipython notebook 
下面

是錯誤:

{ $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 

我已經跑了conda更新anaconda,我已經更新ipython,但錯誤仍然存​​在。我的最終目標是通過Chrome打開筆記本。

更新,如果我嘗試打開筆記本來回Spyder的,這是我所得到的:

enter image description here

+0

您已經安裝了蟒蛇,但通過輸出的外觀,您正在執行python的基本mac安裝中的ipython notebook。當你打開Anaconda的Launcher並從那裏運行Ipython筆記本時會發生什麼? –

回答

0

您需要更新pyzmq,即獨立於IPython的:

sudo pip install -U pyzmq 
+0

安裝後,我得到如下確認:要求已更新:python在/Users/uen449/anaconda/lib/python2.7/site-packages – j2emanue

+0

pyzmq你的系統python呢? –

+0

我如何更新我的系統python,它是如何完成的?你給我的pip命令根據我的python沒有區分。 – j2emanue

相關問題