scikit-learn gives a lot of warnings when it is being imported. It appears I cannot wrap the imports with a suppress as in:
import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)
import sklearn #Throws warning!
It's mentioned that:
python -W ignore::DeprecationWarning some_script.py
can work, but I'm interested in the case where you would run it as a console script (from being installed with setup.py):
myapp
How to suppress the warnings that users should not care about (only the library creators)?
Any of the suggested answers in How to ignore deprecation warnings in Python do not help
I even tried to add -W ignore::DeprecationWarning
in the /usr/bin/myapp
console script, but that does not help either.