【问题标题】:Unable to run ipython-notebook 2.7 with jupyterhub无法使用 jupyterhub 运行 ipython-notebook 2.7
【发布时间】:2015-06-21 05:52:03
【问题描述】:

我正在尝试在 Ubuntu 14.04 上使用 jupyterhub 运行 ipython 2.7 笔记本 - 但我无法找到方法。有什么建议吗?

我知道需要在文件中添加内核 ~/.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"
}   

【问题讨论】:

    标签: ipython ipython-notebook jupyter


    【解决方案1】:

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

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

    话虽如此,即使内核文件错误,您也应该能够启动 jupyterhub。您还有其他错误消息吗?

    【讨论】:

    • 我可以启动 jupyterhub 并制作 ipython3 笔记本。当我运行时,`python2.7 -m IPython kernelspec install-self' 我收到一条错误消息 - “python2.7 File not found kernelspec”正在尝试解决这个问题。
    • 我无法让 kernelspec 自动工作 - 刚刚在 jupyter/kernels/python2/ { "display_name": "Python 2", "language": "python", "argv ": [ "/usr/bin/python2", "-c", "from IPython.kernel.zmq.kernelapp import main; main()", "-f", "{connection_file}" ] }
    • 错误信息是因为python2.7上没有安装IPython 3.x。不要手动创建这些文件,你以后会破坏的。
    猜你喜欢
    • 2015-03-12
    • 2015-05-04
    • 2015-07-22
    • 1970-01-01
    • 1970-01-01
    • 2014-03-19
    • 1970-01-01
    • 2016-10-20
    • 1970-01-01
    相关资源
    最近更新 更多