Syntax error in jinja 2 library

前端 未结 2 1915
甜味超标
甜味超标 2021-01-24 19:20

For running the IPython Notebook on a suse Linux server, I needed to install the jinja2 library:

pip-3.2 install jinja2

Installati

2条回答
  •  爱一瞬间的悲伤
    2021-01-24 19:37

    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
    

提交回复
热议问题