我正在使用 Django 1.4.5,并且刚刚在 virtualenv 中安装了 django-extensions。我正在使用 Python 2.7.1。当我输入:
./manage.py shell_plus --notebook
我得到错误:
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
如果没有该--notebook
选项,它可以正常工作。此外,也ipython notebook
可以正常工作。
谁能建议可能出了什么问题?
谢谢!