How to set up Windows 10 for fast.ai

Thanks Andrea,[quote=“balnazzar, post:12, topic:9811, full:true”]

I see some issues:

  1. In torchvision installation instruction, Pip is written with a capital P. I think it won’t work in OSX.
  2. You will end up with two versions of bcolz, one installed with conda, the other by fastai, in the same env.
  3. I think you should explicitly add some instruction for GPU version of pytorch, since a beginner will just copy & paste your instructions no matter whether he has a GPU or not.
  4. Instructions for creating a separate env should be provided, otherwise a beginner will install everything in the base env, which is generally not advisable.
    [/quote]

i have updated instructions to install.
On windows, bcolz installed with fastai is failing, it’s needed to be installed with conda first.

1 Like

Indeed.

Perfect!

Thanks a great deal for the post. While following your instructions, I encountered with an error saying “Failed building wheel for bcolz”. I noted that the “bcolz” dependency does not come default. So I executed “conda install bcolz”. Then run again “pip install fastai”. Then it worked. Hope this helps who came across the same situation :slightly_smiling_face::slightly_smiling_face::slightly_smiling_face:

1 Like

If we are not using Linux terminal on Windows then we will not be able to execute fast.ai code unless we make a lot of changes so that the dir matches
With Windows…

What are you finding happening with bcolz exactly? It’s listed in environment.yml, so I’m confused why you’re having to install it separately. Are you remembering to activate the fastai environment?

Yes, it was pointed out in “Additional Notes”. Unfortunately, it happens just on Windows: you have to manually install bcolz using conda.

1 Like

Yes @jeremy, it just happens on Windows, and it’s independent from env activation. pip install fastai just fails to install bcolz.
Note that pip install fastai does install bcolz flawlessly when executed on Linux.
It’s not a big issue, but Windows users have to be aware of it in order not to get stuck. Maybe it’s better to take it from Additional Notes and put it into the main guide…

Oh I didn’t realize that’s what you’re doing. The recommended method for the course is conda env update, not pip install. The pip version is pretty old FYI.

I think this could be considered as an occasion for digging deeper into the os python api. Not a big issue, in the end.

@jeremy I don’t know if I’m understanding you correctly, but you have to pip install fastai the first time you create the fresh env for fastai. Am I wrong?

You are indeed wrong. :slight_smile: You should simply type ‘conda env update’ from the fastai folder cloned from git. You should not use pip to install fastai or its dependencies.

Great! Thanks, @jeremy. In order to update the windows guide, let me summarize.

  1. Create a new anaconda env.
  2. Install (presumably) PyTorch for windows from peterjc123 repository.
  3. Install git and clone the official repository.
  4. Do a ‘conda env update’ to get everything up and running.

And you are finished. May you confirm? Thanks!

Note: will you have torchvision installed?

Actually the change needs to be done within the fast.ai codes also…
Like where ever we have / to \
I had tried to run it on Win10 itself…(it always reports error on specific functions (especially when the validation set is called)))

Yes, you have to rewrite a bit of code, but just the parts where you call the os for filesystem operations (at least, that’s what I have observed).

That sounds about right. (Of course after step 3 you’ll need to cd into the cloned repo.)

Torchvision should get installed just fine by conda automatically.

Very good :slight_smile: Thanks!

Of course it woud be great if someone could try and perform a fresh windows installation as per that new guideline.
I’m not too happy at the perspective of compromising my working installation testing with a new env. :thinking:

I’m pretty sure that’s how I tested.

1 Like

Perfect.
I updated the guide. If you find time and will to review it, let me know if it’s ok (or edit it yourself straight away :slight_smile: )

Thanks!

I decided to take one for the team and redo my windows install following the new instructions. I am sad to say that they do not work just yet, at least for me. Running the “conda env update” can’t resolve several (10) packages, most notably torchvision. I also tried to update the env outside of the active environment using the -n flag to no avail. We still have some work to do…

Sorry to hear that. @jeremy reports that conda env update gets everything up and running, but I didn’t quite catch whether he has tested it on both win and linux.

Regardless, what about the older instructions?