ElastAlert and libmagic - elastalert

When trying to run ElastAlert via python (per ElastAlert read the docs page) the below is returned.
Command:
python -m elastalert.elastalert --verbose --rule example_frequency.yaml
Error:
ImportError: failed to find libmagic. Check your installation
I have tried a pip uninstall and reinstall of python-magic 0.4.15 (version which is required of ElastAlert) and still get the same error.

Related

Error intsalling tensorflow via pip install

WARNING: Failed to write executable - trying to use .deleteme logic
ERROR: Could not install packages due to an EnvironmentError: [WinError 2] The system cannot find the file specified: 'c:\python38\Scripts\chardetect.exe' -> 'c:\python38\Scripts\chardetect.exe.deleteme'
I was trying to install Tensorflow via command pip install tensorflow. and after downloading everything at the end found this error..can anyone tell me why this happened?
According to https://www.codegrepper.com/ you can use these two:
In Windows
python -m pip install -U pip --user
In Linux
pip install -U pip --user

Google Colaboratory gives me an error when I want to install OpenSlide

When I ran the following commands in the Jupiter notebook, it gives me an error.
!apt-get install openslide-tools
!pip install openslide-python
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
It was working before but right now it gives me an error when I try to run it.
Seems you have to install the python libraries for openslide through apt-get. Try this
!apt-get install openslide-tools
!apt-get install python3-openslide

Fatal error in launcher: Unable to creat process using "c:\bld\scrapy_345323\_h_env\python.exe"

I installed anaconda and python on Windows 7 without errors.
I tried to run an example from scrapy.org.
scrapy runspider quotes_spider.py -o quotes.json
I got an error:
Fatal error in launcher: Unable to creat process using “c:\bld\scrapy_345323_h_env\python.exe”
How can I resolve this?
Well for anyone that would like to create his first bot from scrapy.org I can confirm the solution is as follows:
first uninstall scrapy from conda
conda uninstall -c conda-forge scrapy
and use pip instead as follows:
pip install --force-reinstall scrapy
I had an astroid 2.2.5 problem, but reinstallation succedeed
and I ran the script succesfully
scrapy runspider quotes_spider.py -o quotes.json
Anyway you may experience other problems running the example provided quotes_spider.py, then I suggest trying locating your spider .py to the same folder as your anaconda prompt (in my case,c:\users\bla bla)
running the anaconda powershell did not work anymore, so I will continue working from anaconda prompt

cffi.error.VerificationError (undefined symbol: SSLv2_client_method) when running Google Cloud Datalab notebook

I'm trying to run this notebook on Google Cloud Datalab: https://github.com/GoogleCloudPlatform/training-data-analyst/blob/master/courses/machine_learning/feateng/feateng.ipynb
While it was perfectly working yesterday, today running the first block results in cffi.error.VerificationError (undefined symbol: SSLv2_client_method).
Can you advise on how I can fix this?
I've tried to do the same from a different GC profile and the problem remains.
I've also tried to fix 'pip install' as described here: pip install fails with "connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:598)". Doing this in Datalab causes the same error; doing this in Cloud shell outside Datalab doesn't change anything.
This has been answered on github by #ekuuni:
https://github.com/GoogleCloudPlatform/training-data-analyst/issues/313
%%bash
source activate py2env
conda install -y pytz
conda update -y pyopenssl
pip uninstall -y google-cloud-dataflow
pip install --upgrade apache-beam[gcp]
I needed these 2 more lines for it to work.
pip install tensorflow_transform
pip install tensorflow==1.9.0
A good workaround is using virtual environments rather than Datalab so you don't have to deal with version updates:
https://cloud.google.com/dataflow/docs/quickstarts/quickstart-python
I have successfully installed the following on python 2.7
apache-beam==2.7.0
tensorflow==1.11.0
tensorflow-transform==0.8.0

Error attempting to install scrapy using easy_install osx 10.8

(Newbie here) I've been attempting to install scrapy using easy_install, but get the following error:
Ben$ easy_install -U Scrapy
Searching for Scrapy
Reading http://pypi.python.org/simple/Scrapy/
Reading http://scrapy.org
Best match: Scrapy 0.14.4
Processing Scrapy-0.14.4-py2.7.egg
Scrapy 0.14.4 is already the active version in easy-install.pth
Installing scrapy script to /Library/Frameworks/Python.framework/Versions/2.7/bin
Using /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Scrapy-0.14.4-py2.7.egg
Processing dependencies for Scrapy
Searching for lxml
Reading http://pypi.python.org/simple/lxml/
Reading http://codespeak.net/lxml
Best match: lxml 2.3.6
Downloading http://lxml.de/files/lxml-2.3.6.tgz
Processing lxml-2.3.6.tgz
Running lxml-2.3.6/setup.py -q bdist_egg --dist-dir /var/folders/j1/l3w7_q554b3fkk3xyw_998nc0000gn/T/easy_install-w5NqEl/lxml-2.3.6/egg-dist-tmp-6MyEeO
Building lxml version 2.3.6.
Building without Cython.
Using build configuration of libxslt 1.1.26
unable to execute gcc-4.0: No such file or directory
error: Setup script exited with error: command 'gcc-4.0' failed with exit status 1
Any idea what I am missing here?
Thanks
Install GCC first; easiest way is via https://github.com/kennethreitz/osx-gcc-installer .
After installing GCC, run easy_install again.