dashboard icon indicating copy to clipboard operation
dashboard copied to clipboard

Python 2.6 Running failed

Open sihouzhao opened this issue 7 years ago • 3 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

sihouzhao avatar Aug 02 '18 05:08 sihouzhao

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

clearlylin avatar Aug 23 '18 07:08 clearlylin

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

Scharfsinnig avatar Jan 07 '19 12:01 Scharfsinnig

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.

hugovk avatar Jan 08 '19 16:01 hugovk