2016-09-07 56 views
0

我是jupyter/ipythondjango的新手。 我有Django 1.9.5安裝在Ubuntu 16.04和我的應用程序運行良好。我想配置iPython(version 5.1.0)以與我的Django應用程序一起使用。基本上試圖從django調用iPython筆記本(瀏覽器),以後可以通過用戶界面在應用程序中廣泛使用它。帶有Django的iPython:CommandError:找不到筆記本(Python)內核規格

當我試圖運行下面

$./manage.py shell_plus --notebook 

命令我得到一個錯誤:

[W 13:46:39.247 NotebookApp] Unrecognized JSON config file version, assuming version 1 
[I 13:46:41.082 NotebookApp] [nb_conda_kernels] enabled, 2 kernels found 
[I 13:46:41.114 NotebookApp] Writing notebook server cookie secret to /run/user/1000/jupyter/notebook_cookie_secret 
[I 13:46:41.399 NotebookApp] ✓ nbpresent HTML export ENABLED 
[W 13:46:41.399 NotebookApp] ✗ nbpresent PDF export DISABLED: No module named nbbrowserpdf.exporters.pdf 
[I 13:46:41.409 NotebookApp] [nb_conda] enabled 
[I 13:46:41.507 NotebookApp] [nb_anacondacloud] enabled 
**CommandError: No notebook (Python) kernel specs found** 

要解決此我想: ipython2 kernelspec安裝自--user

在主目錄.local/share/jupyter/kernels文件夾中有一個kernel.json文件

我不知道爲什麼我仍然得到相同的錯誤。任何建議都將對解決這個問題非常有幫助。謝謝。

爲了實現從Django的啓動IPython的筆記本我試過如下:

  1. 安裝了Django的擴展:pip install django-extensions
  2. 在Django settings.py文件添加行django_extensionsINSTALLED_APPS
  3. ipython profile create和取消註釋此line: c.InteractiveShellApp.extensions = ['django_notebook']

回答

0

我不得不刪除解決問題的Jupyter筆記本擴展:

$conda remove nb_conda 

$ python manage.py shell_plus --notebook 
[I 09:09:19.586 NotebookApp] Writing notebook server cookie secret to /run/user/1000/jupyter/notebook_cookie_secret 
[I 09:09:19.831 NotebookApp] Serving notebooks from local directory: /home/venkateshpatil1/dir/dir1/SC 
[I 09:09:19.832 NotebookApp] 0 active kernels 
[I 09:09:19.832 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/ 
[I 09:09:19.833 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 
相關問題