I solved this by using a new virtualenv, and making sure I had installed iPython in it, i.e:
pip install tornado
pip install pyzmq
pip install ipython
./manage.py shell_plus --notebook
Question
I am using Django 1.4.5 and have just installed django-extensions, in a virtualenv. I am using Python 2.7.1. When I type:
./manage.py shell_plus --notebook
I get the error:
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/.../lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
utility.execute()
File "/Users/.../lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/.../lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
self.execute(*args, **options.__dict__)
File "/Users/.../lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
output = self.handle(*args, **options)
File "/Users/.../lib/python2.7/site-packages/django/core/management/base.py", line 371, in handle
return self.handle_noargs(**options)
File "/Users/.../lib/python2.7/site-packages/django_extensions/management/commands/shell_plus.py", line 140, in handle_noargs
run_notebook()
File "/Users/.../lib/python2.7/site-packages/django_extensions/management/commands/shell_plus.py", line 71, in run_notebook
from IPython.frontend.html.notebook import notebookapp
ImportError: No module named IPython.frontend.html.notebook
Without the --notebook
option it works fine. Also, ipython notebook
works fine too.
Can anyone suggest what might be going wrong?
thanks!
Solution
I solved this by using a new virtualenv, and making sure I had installed iPython in it, i.e:
pip install tornado
pip install pyzmq
pip install ipython
./manage.py shell_plus --notebook
OTHER TIPS
In addition to what user [https://stackoverflow.com/users/905720/racing-tadpole](Racing Tadpole) said above, I also had to install jinja2.
pip install jinja2
A way to test what is missing to have django shell_plus on ipython notebook is trying to execute ipython notebook alone. This way I could detect all missing libraries, like jinja2.
ipython notebook
If this works, your chances are high that shell_plus --notebook will also work.