I gonna use some submodules(datasets
, models
,transforms
) of torchvision
. I have installed torchvision
correctly by typing conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=10.0 -c pytorch
then I opened a python
envs to test my versions
everything is no problem.
However, when I trying to launch my own project, I got a very strange error,
import torchvision.models as models
ModuleNotFoundError: No module named 'torchvision.models'; 'torchvision' is not a package
I searched for solutions to this error on google, but don’t find any useful messages. So any cues would be highly appreciated. Thank you in advance.