python - Jinja2.5 Syntax error on import -
i using python 3.2.3. , installed jinja2.5 downloading page: https://pypi.python.org/pypi/jinja2/2.5.5
then used setup.py install it. seemed worked charm. when tested using line:
from jinja2 import template
i got next error:
traceback (most recent phone call last): file "<stdin>", line 1, in <module> file "/usr/local/lib/python3.2/dist-packages/jinja2-2.5.5-py3.2.egg/jinja2/__init__.py", line 37, in <module> jinja2.environment import environment, template file "/usr/local/lib/python3.2/dist-packages/jinja2-2.5.5-py3.2.egg/jinja2/environment.py", line 13, in <module> jinja2 import nodes file "/usr/local/lib/python3.2/dist-packages/jinja2-2.5.5-py3.2.egg/jinja2/nodes.py", line 18, in <module> jinja2.utils import markup, methodtype, functiontype file "/usr/local/lib/python3.2/dist-packages/jinja2-2.5.5-py3.2.egg/jinja2/utils.py", line 585, in <module> markupsafe import markup, escape, soft_unicode file "/usr/local/lib/python3.2/dist-packages/markupsafe/__init__.py", line 70 def __new__(cls, base=u'', encoding=none, errors='strict'): ^ syntaxerror: invalid syntax
this on raspberry pi raspbian installed. don't know why error occures, because docs jinja2.5 , python 3.2 compatible.
can help me out? in advance!
try typing python --version
if reply not python 3. default python python 2 , not back upwards u''
unicode strings.
if case need install jinja2
using pip3 install jinja2
, run scripts python3 scriptname.py
.
other see: syntax error in jinja 2 library python 3.2 no longer supported selection pick library or upgrade python.
python syntax-error raspbian jinja
No comments:
Post a Comment