Skip to content Skip to sidebar Skip to footer

Syntax Error In Jinja 2 Library

For running the IPython Notebook on a suse Linux server, I needed to install the jinja2 library: pip-3.2 install jinja2 Installation printed a syntax error but also said 'installa

Solution 1:

Install jinja 2.5, using:

easy_install jinja2==2.5

That solved the problem for me (happily).

Solution 2:

Jinja2 only supports Python 3.3 and up, you are trying to install it for Python 3.2. Quoting from the documentation:

Jinja 2.7 brings experimental support for Python >=3.3.

Python 3.3 added support for u'..' string literals to make it easier to write compatible code that runs both on Python 2 and 3, which Jinja2 makes use of.

You'll either have to upgrade to Python 3.3, or pick a different templating library or use an earlier version.

The requirement was upgraded to 3.3 in version 2.7 (see the changelog), so you could try installing 2.6:

pip install jinja2==2.6

Post a Comment for "Syntax Error In Jinja 2 Library"