2015-06-21 44 views
1

我想在Ubuntu 14.04上运行带有jupyterhub的ipython 2.7笔记本电脑 - 但我一直无法想出办法。有什么建议么?无法运行ipython-notebook 2.7与jupyterhub

我知道一个人需要在文件中添加内核〜/ .ipython/kernels.json 我在这个文件中的以下内容:

{ 
"argv": ["python3", "-m", "IPython.kernel", 
      "-f", "{connection_file}"], 
"display_name": "Python 3", 
"language": "python" 
} 
{ 
"argv": ["python2.7", "-m", "IPython.kernel", 
     "-f", "{connection_file}"], 
"display_name": "Python 2", 
"language": "python" 
} 

回答

3

~/.ipython/kernels.json是不正确的路径。这些文件不需要手工编辑。此外,您拥有的文件不是有效的json,如果它位于正确的位置,服务器将无法读取它。

使用python2.7 -m IPython kernelspec install-selfpython3 -m IPython kernelspec install-self为IPython将正确的文件放在正确的位置。

这就是说,即使内核文件错误,你应该可以启动jupyterhub。你有其他的错误信息吗?

+0

我可以启动jupyterhub并制作ipython3笔记本。 当我运行时,'python2.7 -m IPython kernelspec install-self'我得到一个错误信息 - “python2.7 File not found kernelspec” 试图现在解决这个问题。 – pulkitag

+0

我couldnot自动进行kernelspec工作 - 只是jupyter /粒/ python2创建kernel.json文件/ { “DISPLAY_NAME”: “巨蟒2”, “语言”: “蟒蛇”, “ARGV”: [ “的/ usr /斌/ python2”, “-C”, “从IPython.kernel.zmq.kernelapp进口主;主()”, “-f”, “{} connection_file” ] } – pulkitag

+0

错误消息是因为IPython 3.x未安装在python2.7上。不要手动创建这些文件,你会在以后破坏。 – Matt