From e065543bb32760241bb695270429e1a16942e806 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Tue, 5 Apr 2022 11:29:05 +0200 Subject: [PATCH] fix missing torchdata error message --- torchvision/prototype/datasets/__init__.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/torchvision/prototype/datasets/__init__.py b/torchvision/prototype/datasets/__init__.py index bf99e175d36..1253635d51e 100644 --- a/torchvision/prototype/datasets/__init__.py +++ b/torchvision/prototype/datasets/__init__.py @@ -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