Elastalert: Elastalert install broken by python-dateutils release 2.7.0

Created on 15 Mar 2018  路  4Comments  路  Source: Yelp/elastalert

Elastalert's requirement specify python-dateutil <= 2.7.0

Elastalert embeds botocore. Its requirements specify python-dateutil < 2.7.0

Note: less than or equal in the first place, properly less than in the second case.

Maintainers released ~Python~ python-dateutil 2.7.0 around Monday, March 12 2018. So now, the Elastalert installer downloads python-dateutil version 2.7.0. Then when Elastalert starts, this error occurs:

Mar 14 23:20:50 localhost elastalert: raise VersionConflict(dist, req).with_context(dependent_req)
Mar 14 23:20:50 localhost elastalert: pkg_resources.ContextualVersionConflict: (python-dateutil 2.7.0 (/usr/lib/python2.7/site-packages), Requirement.parse('python-dateutil<2.7.0,>=2.1'), set(['botocore']))

And pipdeptree confirms:

# pipdeptree -p botocore
Warning!!! Possibly conflicting dependencies found:
* botocore==1.9.9
 - python-dateutil [required: <2.7.0,>=2.1, installed: 2.7.0]
------------------------------------------------------------------------
botocore==1.9.9
  - docutils [required: >=0.10, installed: 0.14]
  - jmespath [required: <1.0.0,>=0.7.1, installed: 0.9.3]
  - python-dateutil [required: <2.7.0,>=2.1, installed: 2.7.0]
    - six [required: >=1.5, installed: 1.11.0]

Most helpful comment

Workaround: in my case, the pip-based Elastalert installation is automated. I worked around the problem by adding another call to pip that forces a downgrade of python-dateutil to 2.6.1 after installing Elastalert but before trying to start it.

All 4 comments

I got the same wrong.
When I excute "python setup.py install",I got:
error: python-dateutil 2.7.0 is installed but python-dateutil<2.7.0,>=2.1 is required by set(['botocore'])

Workaround: in my case, the pip-based Elastalert installation is automated. I worked around the problem by adding another call to pip that forces a downgrade of python-dateutil to 2.6.1 after installing Elastalert but before trying to start it.

thanks for your reply.while I'm new at linux.Could you please tell me how to dongrade date-util?I have uninstall date-util and install the version2.6.1
But I still got thw same wrong

@vincentwang0736
pip install "python-dateutil<2.7.0,>=2.1"

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JeffAshton picture JeffAshton  路  3Comments

abhishekjiitr picture abhishekjiitr  路  3Comments

rhysxevans picture rhysxevans  路  3Comments

tkumark picture tkumark  路  3Comments

shaohk picture shaohk  路  4Comments