2015-06-21 58 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