Search code examples
pythonpipelasticsearch-curator

PIP install failing with Syntax error for library


I am trying to install curator library for Lambda packaging using PIP3. For that i am running the command

pip3 install curator -t ./

I am getting the following error :

Collecting curator
  Downloading https://files.pythonhosted.org/packages/0b/5f/d15b6aeae8768120303b058f36a381e4f17df3f55eda716fc76edf4fab80/curator-2.1.tar.gz (385kB)
     |████████████████████████████████| 389kB 5.0MB/s 
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0jt7crai/curator/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0jt7crai/curator/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-0jt7crai/curator/pip-egg-info
         cwd: /tmp/pip-install-0jt7crai/curator/
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-0jt7crai/curator/setup.py", line 14
        except IOError, e:
                      ^
    SyntaxError: invalid syntax
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Is this really a syntax issue or PIP going nuts... I have already upgraded setuptools, pip3, etc. I have downloaded the library and removed the entire except block as well. If there is a way to use that library, I am all for it... Any ideas?


Solution

  • Try this:

    pip3 install elasticsearch-curator