我一直在尝试按照几个教程设置一个ipython服务器(因为没有一个是我的情况)。几天前,我确实设法让它达到启动的程度,但之后却无法通过url访问它。今天它不再发布了,我找不到太多关于我得到的这个具体错误:
Traceback (most recent call last):
File "/usr/local/bin/ipython", line 9, in <module>
load_entry_point('ipython==4.0.0-dev', 'console_scripts', 'ipython')()
File "/usr/local/lib/python2.7/dist-packages/ipython-4.0.0_dev-py2.7.egg/IPython/__init__.py", line 118, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/traitlets-4.0.0-py2.7.egg/traitlets/config/application.py", line 591, in launch_instance
app.initialize(argv)
File "<string>", line 2, in initialize
File "/usr/local/lib/python2.7/dist-packages/traitlets-4.0.0-py2.7.egg/traitlets/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/ipython-4.0.0_dev-py2.7.egg/IPython/terminal/ipapp.py", line 302, in initialize
super(TerminalIPythonApp, self).initialize(argv)
File "<string>", line 2, in initialize
File "/usr/local/lib/python2.7/dist-packages/traitlets-4.0.0-py2.7.egg/traitlets/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/ipython-4.0.0_dev-py2.7.egg/IPython/core/application.py", line 386, in initialize
self.parse_command_line(argv)
File "/usr/local/lib/python2.7/dist-packages/ipython-4.0.0_dev-py2.7.egg/IPython/terminal/ipapp.py", line 297, in parse_command_line
return super(TerminalIPythonApp, self).parse_command_line(argv)
File "<string>", line 2, in parse_command_line
File "/usr/local/lib/python2.7/dist-packages/traitlets-4.0.0-py2.7.egg/traitlets/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/traitlets-4.0.0-py2.7.egg/traitlets/config/application.py", line 487, in parse_command_line
return self.initialize_subcommand(subc, subargv)
File "<string>", line 2, in initialize_subcommand
File "/usr/local/lib/python2.7/dist-packages/traitlets-4.0.0-py2.7.egg/traitlets/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/traitlets-4.0.0-py2.7.egg/traitlets/config/application.py", line 418, in initialize_subcommand
subapp = import_item(subapp)
File "build/bdist.linux-x86_64/egg/ipython_genutils/importstring.py", line 31, in import_item
ImportError: No module named notebook.notebookapp
关于设置,我已经安装了ipython的anaconda发行版,pyzmq&amp;龙卷风图书馆。我创建了一个配置文件nbserver,配置文件如下 - ipython.config.py:
c = get_config()
c.IPKernalApp.pylab = 'inline'
c.NotebookApp.certfile = u'/home/ludo/.ipython/profile_nbserver/mycert.pem'
c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.password = u'sha1:e6cb2aa9a[...]'
c.NotebookApp.port = 9999
c.NotebookManager.notebook_dir = u'/var/www/ipynb/'
c.NotebookApp.base_project_url = '/ipynb/'
c.NotebookApp.base_kernel_url = '/ipynb/'
c.NotebookApp.webapp_settings = {'static_url_prefix':'/ipynb/static/'}
我真的不知道在哪里寻找线索 - 而且我可能对这一切如何解决问题缺乏更深入的了解。我的最终目标是在SO上使用this question的答案来完成apache背后的设置并最终将其连接到colaboratory - 但似乎它应该首先启动。
非常感谢任何帮助:)
答案 0 :(得分:158)
这应解决问题:
pip install jupyter
答案 1 :(得分:4)
所以要关闭这个帖子,如果它对任何人有帮助,我的错误就是盲目地安装并使用了ipython的开发版本跟随一个教程,以为我正在使用我之前安装的anaconda实例(甚至不是我的路径)。
无论如何我:
现在一切正常。
答案 2 :(得分:2)
有人在评论中提到这一点,而且(几乎)对我有用:
pip install ipython[notebook]
pip
给出了关于哈希不匹配的错误。然而,最终起作用的是:
sudo port install py27-notebook
对于py3:
sudo port install py35-notebook
答案 3 :(得分:0)
如果你现在没有做什么,你不应该尝试从github master分支安装。删除已安装的内容并坚持使用稳定版本。
如果您想使用developpement版本,请在developpement邮件列表中查询。可能需要一些关于如何调试它的知识。