'How can I automatically install all missing dependencies from pip check?

When I run pip check I get a list of missing dependencies of installed packages, e.g.:

beautysh 6.2.1 requires colorama, which is not installed.

How can I automatically install all missing dependencies? Is there a way for pip to handle this? Or should I start messing with piping pip check to sed and xargs?



Solution 1:[1]

This worked for me:

pip check | sed -rn 's/.*requires ([^,]+),.*/\1/p' | xargs pip install

But I'm still hoping for a flag to pip check or pip install, something like that

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Harm