Help with torchvision

Hi All, @stas (Stas, I’ve tagged you because I see you are active on torchvision-nightly on github and active here…) I have built my own box, I am stuck on the install of torchvision. The Unofficial setup thread says to use:
conda install -c fastai torchvision-nightly
this however gives me a PackagesNotFoundError

If instead i try to use conda install -c fastai torchvision it wants to remove pytorch-nightly 1.1.0 to and install pytorch 0.4.1

If I try 'conda install -c pytorch torchvision` it installs pytorch 1.0.1.Then when I execute:

from import *

I get the error:

NameError                                 Traceback (most recent call last)
<ipython-input-7-283c0d40bede> in <module>
----> 1 from import *
      2 from fastai.metrics import error_rate

~/anaconda3/envs/fastai/lib/python3.7/site-packages/fastai/vision/ in <module>
      8 from .. import vision
---> 10 __all__ = ['models', 'vision', *learner.__all__, *data.__all__, *image.__all__, *transform.__all__, *tta.__all__]

NameError: name 'image' is not defined

How should I install torchvision in my fastai conda env?

Thanks, Mark

@MarkD, you must have stumbled upon some old instructions - please give me the link so that perhaps it could be fixed.

Forums aren’t great for finding up-to-date information - there is a lot of outdated/incorrect info around here.

Please follow the official instructions here and it should work:

torchvision-nightly was needed only back in Nov-18 and is no longer required.

If you encounter a problem please post here: Fastai v1 install issues thread

@stas , thank you, I will reinstall and report back when I have everything working. In the meantine this Unofficial Setup thread (Local, AWS) is where I was getting my instructions before

Great. It’s a wiki post, so please go ahead and update it. Thank you!

@stas Thank you, everything worked perfectly using those correct instructions. I will update the wiki page.

1 Like