The eta.core.utils.ensure_package() method allows for multiple choice requirement strings like tensorflow-gpu|tensorflow>2, which means "either tensorflow-gpu or tensorflow>2 must be installed".
import eta.core.utils as etau
# previously failed; now works
etau.install_package("tensorflow|torch")
***** Requirement 'tensorflow|torch' has multiple options. We're going to install the first one: 'tensorflow' *****
...
Requirement already satisfied: tensorflow in /Users/Brian/dev/env/eta3/lib/python3.6/site-packages (2.4.0)
The
eta.core.utils.ensure_package()
method allows for multiple choice requirement strings liketensorflow-gpu|tensorflow>2
, which means "eithertensorflow-gpu
ortensorflow>2
must be installed".This PR supports the same syntax for
eta.core.utils.install_package()
, which fixes https://github.com/voxel51/fiftyone/issues/919.