probability
probability copied to clipboard
Improve missing optional dependency error
Two changes to improve the error message when an optional dependency is missing
- using an exception of the same type that was originally raised (i.e.
ImportErrororModuleNotFoundError, but flexible), therefore not breaking any code. This allows to add a clear message and instruction. The previousprintwas printing before the stacktrace, obfuscating the actual instructions. Now they are prominently displayed. - Extend the installation instructions for
tf-kerasfor conda-forge, as we intend to make it an optional dependency there as well and conda does not offer the same optional dependencies as pypi does.