Skip to content

Commit

Permalink
fix missing torchdata error message (#5738)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmeier committed Apr 5, 2022
1 parent c6c9ab9 commit d0c92dc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions torchvision/prototype/datasets/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
try:
import torchdata
except (ModuleNotFoundError, TypeError) as error:
except ModuleNotFoundError:
raise ModuleNotFoundError(
"`torchvision.prototype.datasets` depends on PyTorch's `torchdata` (https://github.com/pytorch/data). "
"You can install it with `pip install git+https://github.com/pytorch/data.git`. "
"Note that you cannot install it with `pip install torchdata`, since this is another package."
) from error
"You can install it with `pip install --pre torchdata --extra-index-url https://download.pytorch.org/whl/nightly/cpu"
) from None

from . import utils
from ._home import home
Expand Down

0 comments on commit d0c92dc

Please sign in to comment.