iPython was installed on a Mac OS X Mountain Lion using pip. When running ipython notebook in the Terminal, I get the error
...
File "/Users/god/.virtualenvs/datasci/lib/python2.7/site-packages/IPython/html/notebookapp.py", line 38, in <module>
from jinja2 import Environment, FileSystemLoader
ImportError: No module named jinja2
Question: What is the problem here, and how should we resolve it?
Jinja 2 is listed as an optional dependency, see the iPython quickstart.
You must install optional dependencies separately:
pip install Jinja2
You can install such dependencies as optional functionality groups for ipython. Using these let you install the dependencies needed for that functionality; each of these groups can be installed with pip install ipython[groupname]:
notebook: for the webbased notebookqtconsole: for the Qt consoleparallel or zmq: for the ZMQ messaging support (separate sharable kernel)doc: tools required to generate the documentationtest: dependencies to run the test suitenbformat: dependencies for producing the notebook interchange formatnbconvert: dependencies for the nbconvert tool to convert the notebook format to other formats.So to install all dependencies for ipython notebook use:
pip install ipython[notebook]
and ipython is installed plus the dependencies, or if you already have ipython installed it'll add on the missing packages.
Alternatively, install all optional dependencies with:
pip install ipython[all]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With