-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exotel dependencies break install and running module #1023
Comments
@fabianlee pls try |
I do need to install "setuptools>=11.3" before install in order for it to work. But the mismtach in the "requests" module between this project and exotel continue to be an issue. |
Maybe this behavior is depending on version of pip/site packages/pypi cache or something else, but installing directly from requirements.txt works for me.
If someone knows why this works for me just fine but not for others, I'd love to know. In either case, I plan on a lot of these alerter libraries optional in the near future to avoid these types of issues for most people. |
@Qmando - I get the same thing as you up to that point (latest vagrant 'ubuntu/trusty' box), but after that type "$ bin/python setup.py install" and see if you get the following error
|
Don't do setup.py install afterwards. Once you run pip, you've installed everything. Setuptools is much stricter when it comes to dependencies. Instead, do |
@Qmando - you are correct that running 'pip install -e' does produce the executable successfully. However, then when trying to then run the application "bin/elastalert" an error is thrown and this is the error:
This happens whether running the sequence of "pip install -r requirements.txt" then "pip install -e ." from a virtualenv (bin/elastalert) or not inside a virtual env (/usr/local/bin/elastalert). Quick note that when NOT using a virtualenv, I do have to run "pip install -r 'setuptools>=11.3'" before installing requirements.txt, or else I get a compile error about a missing yaml.h. |
The exotel version used in elastalert is |
I have same problem with this issue. I have applied your solutions but the problem is still here.
+1 |
It seems to have been changed: https://github.com/sarathsp06/exotel-py/blob/master/requirements.txt |
The exotel library used in an alerter (introduced into this project Mar 2 2017) has pinned modules dependencies on 'requests' and 'requests-oauthlib'. These dependencies are incompatible with ElastAlert's version of these libraries and is causing errors when trying to run install as well as run the binary.
These errors are not seen if the import and code referring to exotel is commented out from elastalert/alerts.py
There are two ways to see this issue:
1. After install, then running 'pip install -r requirements.txt', run '/usr/local/bin/elasticsearch'
Trying to run /usr/local/bin/elastalert results in a stack trace with this as the ending line:
pkg_resources.DistributionNotFound: requests-oauthlib==0.5.0
Even if you upgrade requests-oauthlib to 0.5.0, you still can't satisfy the 'requests' package and get this error when running the binary:
pkg_resources.VersionConflict: (requests 2.5.1 (/usr/local/lib/python2.7/dist-packages), Requirement.parse('requests==2.2.1'))
2. After install, then running 'pip install -r requirements.txt', try running the installer again 'python setup.py install'
error: Installed distribution requests 2.5.1 conflicts with requirement requests==2.2.1
I've contacted the author of the exotel module about allowing more general dependency checks (>=) in their module, but they have responded that they want ElastAlert to change it's requirements.txt
sarathsp06/exotel-py#3
My very shallow testing has shown mixed success with moving up to the later version of the exotel module and the versions of the dependent modules below. When using pip to install the newer versions in requirements.txt I get gcc compilation errors about yaml.h not being found when trying to build check_libyaml.c. Despite that, /usr/local/bin/elastalert is then able to run successfully, but I'm not sure what other functionality might be affected.
exotel==0.1.3
requests=2.13.0
requests-oauthlib==0.5.0
Again, these errors are not seen if the import and code referring to exotel is commented out from elastalert/alerts.py.
The text was updated successfully, but these errors were encountered: