SyntaxError: 'invalid syntax' cuisine.py at 342
3kami3 opened this issue · comments
In pip install, error.
# python --version Python 2.6.6 # pip list decorator (3.0.1) distribute (0.6.10) ecdsa (0.13) ethtool (0.6) Fabric (1.10.2) firstboot (1.110) iniparse (0.3.1) iotop (0.3.2) iwlib (1.0) lxml (2.2.3) M2Crypto (0.20.2) paramiko (1.15.2) policycoreutils-default-encoding (0.1) pycrypto (2.6.1) pycurl (7.19.0) pygpgme (0.1) pyOpenSSL (0.10) python-dateutil (1.4.1) python-dmidecode (3.10.13) python-meh (0.11) pyxdg (0.18) rhnlib (2.5.22) rhsm (1.9.6) scdate (1.9.60) sckdump (2.0.5) sesearch (1.0) setools (1.0) setroubleshoot-default-encoding (0.1) simplejson (2.0.9) slip (0.2.20) slip.dbus (0.2.20) urlgrabber (3.9.1) yum-metadata-parser (1.1.2) # pip install cuisine Downloading/unpacking cuisine Downloading cuisine-0.7.10.tar.gz Running setup.py egg_info for package cuisine Requirement already satisfied (use --upgrade to upgrade): fabric in /usr/lib/python2.6/site-packages (from cuisine) Requirement already satisfied (use --upgrade to upgrade): paramiko>=1.10 in /usr/lib/python2.6/site-packages (from fabric->cuisine) Requirement already satisfied (use --upgrade to upgrade): pycrypto>=2.1,!=2.4 in /usr/lib64/python2.6/site-packages (from paramiko>=1.10->fabric->cuisine) Requirement already satisfied (use --upgrade to upgrade): ecdsa>=0.11 in /usr/lib/python2.6/site-packages (from paramiko>=1.10->fabric->cuisine) Installing collected packages: cuisine Running setup.py install for cuisine SyntaxError: ('invalid syntax', ('/usr/lib/python2.6/site-packages/cuisine.py', 342, 32, '\treturn {k:fabric.api.env[k] for k in (\n')) Successfully installed cuisine Cleaning up...
A cord of comment was added after 0.7.7.
340 def options():
341 """Retrieves the list of options as a dictionary."""
342 return {k:fabric.api.env[k] for k in (
343 OPTION_PACKAGE,
344 OPTION_PYTHON_PACKAGE,
345 OPTION_OS_FLAVOUR,
346 OPTION_USER,
347 OPTION_GROUP,
348 OPTION_HASH)}
Is it no problem in this cord?
Does Python 2.x support it?
It looks like you're using Python 2.6, use Python 2.7 and it will work.