question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iPython 4.0 breaks shell_plus notebook

See original GitHub issue

Upgrading to iPython 4.0 will create an error when running python manage.py shell_plus --notebook:

.virtualenvs/django-q/lib/python3.4/site-packages/jupyter_client/kernelspec.py", line 143, in get_kernel_spec
    raise NoSuchKernel(kernel_name)
jupyter_client.kernelspec.NoSuchKernel: 'python'

I’ve tested this with both Python 2.7.9 and 3.4.2. Downgrading to iPython 3.2.1 returns everything to normal.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
hanleybrandcommented, Aug 28, 2015

One thing to note if you’ve tried

pip install -U git+git://github.com/django-extensions/django-extensions.git@92008a391c6357d7896a65ea74ac103664e21ddc

and it’s not working because

The `IPython.html` package has been deprecated. You should import from `notebook` instead. `IPython.html.widgets` has moved to `ipywidgets`.
  "`IPython.html.widgets` has moved to `ipywidgets`.", ShimWarning)

Traceback ([EDITED]):
....
  File ".../django_extensions/management/commands/shell_plus.py", line 353, in handle_noargs
    shell = get_notebook()
  File ".../django_extensions/management/commands/shell_plus.py", line 119, in get_notebook
    from IPython.html.notebookapp import NotebookApp
ImportError: No module named notebookapp

even though it may seem like there’s still a problem with django-extensions, it may be that you didn’t install ipython with notebook support. In this case, try:

pip install -U "ipython[notebook]"

0reactions
trbscommented, Aug 28, 2015

@hanleybrand please (re)try with 9648b292614110852d6e233b91a78d328688c819 it should now try the new notebook package first. This should get rid of the error at startup.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I set up Jupyter/IPython Notebook for Django?
With a recent upgrade to Jupyter Notebook this setup is now broken for me. I am able to run Django code in the...
Read more >
shell_plus — django-extensions 3.2.1 documentation
The Django settings module and database models are auto-loaded into the interactive shell's global namespace also for IPython Notebook. Auto-loading is done by ......
Read more >
2.4.2. Running python in the cloud - Jean Mark Gawron
Google colab notebook is another way of interacting with python, just like IPython is, but Google colab notebook uses your browser, has a...
Read more >
django-extensions Changelog - pyup.io
Improvement: shell_plus, not save ipython history when using Jupyter ... Fix: shell_plus, move notebook down the list of preferred shells
Read more >
Wagtail CMS: Setting up Django Shell, shell_plus and ipython ...
Django shell_plus with IPython is how I learned Wagtail so quickly. It let me explore the entire Wagtail application and trial/error ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found