我已经成功安装了IPython及其依赖项,它在命令行中完美运行,但它不会在浏览器中作为“ipython notebook”启动。它给出的错误:
Traceback (most recent call last):
File "/usr/local/bin/ipython", line 5, in <module>
start_ipython()
File "/Library/Python/2.7/site-packages/IPython/__init__.py", line 120, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File "/Library/Python/2.7/site-packages/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/config/application.py", line 92, in catch_config_error
return method(app, *args, **kwargs)
File "/Library/Python/2.7/site-packages/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/config/application.py", line 92, in catch_config_error
return method(app, *args, **kwargs)
File "/Library/Python/2.7/site-packages/IPython/core/application.py", line 381, in initialize
self.parse_command_line(argv)
File "/Library/Python/2.7/site-packages/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/config/application.py", line 92, in catch_config_error
return method(app, *args, **kwargs)
File "/Library/Python/2.7/site-packages/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/config/application.py", line 92, in catch_config_error
return method(app, *args, **kwargs)
File "/Library/Python/2.7/site-packages/IPython/config/application.py", line 406, in initialize_subcommand
subapp = import_item(subapp)
File "/Library/Python/2.7/site-packages/IPython/utils/importstring.py", line 42, in import_item
module = __import__(package, fromlist=[obj])
File "/Library/Python/2.7/site-packages/IPython/html/notebookapp.py", line 39, in <module>
check_for_zmq('2.1.11', 'IPython.html')
File "/Library/Python/2.7/site-packages/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
我尝试过升级软件包。我还读到,问题可能是IPython安装在与其依赖项不同的环境中,或者路径被破坏。由于我对Mac完全不熟悉,我不知道如何纠正它。任何有关如何使IPython Notebook工作的帮助或任何替代解决方案都将非常感谢!
答案 0 :(得分:0)
试
easy_install --upgrade IPython
easy_install --upgrade pyzmq
答案 1 :(得分:0)
经过数小时的搜索和故障排除后,我在Mac OS X Yosemite(10.10)上安装了ipython笔记本。
要避免任何与权限相关的错误,请先使用python下载并安装virtualenv。 然后继续如下
$ virtualenv venv
$ source venv/bin/activate
(venv)[user@host ]$ pip install ipython[all]
Successfully installed ...
(venv)[user@host ]$ ipython notebook
会在安装了所有模块的情况下调出笔记本电脑。当您完成环境后,您可以轻松地将其停用。