open-falcon / dashboard

falcon-plus frontend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python 2.6 Running failed

sihouzhao opened this issue · comments

system:
CentOS release 6.3 (Final)
python:
Python 2.6.6
file:
./env/lib/python2.6/site-packages/babel/plural.py
error:
used_tags = rule.tags | {_fallback_tag}
SyntaxError: invalid syntax

Traceback (most recent call last):
File "wsgi.py", line 28, in
from rrd import app
File "/root/dashboard/rrd/init.py", line 20, in
from flask.ext.babel import Babel, gettext
File "/root/dashboard/env/lib/python2.6/site-packages/flask/exthook.py", line 62, in load_module
import(realname)
File "/root/dashboard/env/lib/python2.6/site-packages/flask_babel/init.py", line 21, in
from babel import dates, numbers, support, Locale
File "/root/dashboard/env/lib/python2.6/site-packages/babel/init.py", line 20, in
from babel.core import UnknownLocaleError, Locale, default_locale,
File "/root/dashboard/env/lib/python2.6/site-packages/babel/core.py", line 16, in
from babel.plural import PluralRule
File "/root/dashboard/env/lib/python2.6/site-packages/babel/plural.py", line 244
used_tags = rule.tags | {_fallback_tag}

SyntaxError: invalid syntax

I occured the same problem. How to solve it ? QAQ

This is because Babel (the Python Internationalization Library) no longer supports Python 2.6, because Python 2.6 has been EOL and unsupported by the core Python team for over five years (since 2013-10-29).

You could try installing an old version of Babel (eg. pip install "babel<2.6.0") but you're better off upgrading to Python 2.7 (EOL 2020-01-01), or better, Python 3.