Set up course v3 on Windows

It may sound duplicated from other posts, but I did try all the mentioned approaches but they failed in my case.

I am working with Windows 10 and anaconda prompt. I could easily setup the environment for the previous version of the course (dl1) by following @jeremy 's post Howto: installation on Windows.

Now I would like to start the v3 course. I checked out the new course in a different drive (d:\ instead of c:). It couldn’t find fastai. Then I delete the old env and set up a new one, but I still got ModuleNotFound error.
ModuleNotFoundError: No module named ‘fastai’

I must have screwed up the path and links. Could we have a step by step setup for course v3 for Windows. Thanks!

In my case, what is the best way to clean my messy enviorment?

Many thanks,

Jack

1 Like

Is course-v3 folder at the same level as fastai folder?

1 Like

The step 6 instructions at https://course.fast.ai/start_aws.html works for me.

  1. Launch ‘Anaconda Prompt’

  2. Install Git for Windows

  3. To get a folder with all the fast.ai materials:

git clone https://github.com/fastai/course-v3
  1. Then run these commands to install the necessary packages for experimenting with fast.ai and PyTorch:
conda update conda
conda install -c pytorch -c fastai fastai pytorch torchvision cuda92
  1. Next move into the directory where you will find the materials for the course by running:
cd course-v3/nbs/dl1
  1. Finally run:
jupyter notebook
10 Likes

@bsalita Yes, I checked out a new fastai folder which is at the same level of course-v3.

Thanks, @alice.

By following your steps, I am able to elimite the following error:
ModuleNotFoundError: No module named ‘fastai’

But when I run the second cell in lesson1-pets.ipynb:
from fastai.vision import
from fastai.metrics import error_rate

I got the dll load error.
ImportError: DLL load failed: The specified module could not be found.
I am attaching a screen shot below.

Many thanks,

Jack

Hi alice,

Thank you soooo much for mentioning this. I was so confused the last days over getting my own laptop ready for the course and was finally thinking of a Linux installation on it. I’m glad i saw this. Thank you!

3 Likes

@alice Did you set up a fastai enviornment in conda?

OK. Now I know my problem. I have been creating a fastai environment following Howto: installation on Windows . Apparently the enviorment created in the fastai/fastai folder does not work for course v3. This didn’t work even if I do
conda install -c pytorch -c fastai fastai pytorch torchvision cuda92

Now, if I simply do the above installation in the base environment of conda, then it works. It would be nice though if a fastai enviorment can be created for course v3. Maybe it is already existing somewhere but I just don’t know of.

In short, do what @alice mentioned in the base environment in conda. Thanks everyone for helping out!

Jack

1 Like

You can try pinning version of Pytorch to 1.0.0. I noticed some issues with fastai on latest Pytorch 1.0.1 on Windows.

Thanks @zenlytix for the information. I am using Pytorch 1.0.1. What is the problem? How to resolve it?

BTW, for those who wants to check the version of pytouch on terminal, you may simply type
python -c "import torch; print(torch.__version__)"

The problem I noticed was that the create_cnn in lesson1 was hanging indefinitely when I updated Pytorch to 1.0.1. To resolve it I pinned version of Pytorch to 1.0.0 by running : conda install -c pytorch pytorch=1.0.0. You can use this script that is used on Azure Windows Data Science VM as a reference.

@zenlytix I confirmed that Pytorch 1.0.1 does have problem. Switching back to 1.0.0 helps. Thank you!

1 Like

Hi, I have been able to get course-v3 running reliably on my Windows 10 laptop (/w 1050 TI GPU).

Here are the steps: https://github.com/parthopdas/c-fastai2019/blob/master/README.md
I have also verified with nvidia-smi that my GPU is indeed getting used while training.

Checkout the few scripts under the tools folder.

Let me know how it goes for you.

7 Likes

This is a really good tip. Saves a lot of time. Definitely going to use. Thanks!!

It’s weird when I lunch jupyter notebook from fastai env ( installed from coursev1 and updated) it shows nothing (blank page with 302 get error) however when I lunch jupyter notebook without env everything works fine and I can execute nb cells and train models, etc…
Should I keep it this way or I need to launch it from fastai env ?

No luck setting up v3 course on win10. Followed instructions here. Either ordinal 242 problem, and if I follow fix instruction to fix it I get “the procedure entry point fatbinaryctl_createhandle” error. I tried fresh env with python 3.6.8, 3.7.1 and 3.7.2, pytorch different versions, mkl different versions, fastai different versions. fix one, break another

EDIT: For the [Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll.] -error I finally found another fix removing some dlls from system32 that doesnt create a new problem:

does it work if you follow the instructions here? Set up course v3 on Windows

I have had the previous version of fastai installed and working fine on my Windows 10 laptop. I used @alice’s instructions and it shows a weird error after the following line-
conda install -c pytorch -c fastai fastai pytorch torchvision cuda92

This code tries to look for packages to be updated, installed and downloaded. All the packages get downloaded except for SpaCy 2.0.18. after downloading 40-50% it gives out the HTTPError everytime.

Not sure what’s going on. I also tried to do pip install spacy which worked but maybe not the required version. Not sure how to work around this and why this is happening.

Attached herewith is the snapshot of Anaconda Prompt

1 Like

Hi Alice,

I have gone through your steps but finally run jupyter notebook is showing error.

I just got started with fastai v3 on windows 10 and followed the above steps. There was an issue with the wrapt module. With conda command the latest was 1.11.1 so it complained about the dependency.

UnsatisfiableError: The following specifications were found to be incompatible with each other:

  • anaconda==2019.03=py37_0 -> astroid==2.2.5=py37_0 -> wrapt
  • anaconda==2019.03=py37_0 -> importlib_metadata==0.8=py37_0 -> zipp[version=’>=0.3.2’]
  • astroid -> wrapt
  • fastai -> spacy[version=’>=2.0.18’] -> thinc[version=’>=6.12.0,<6.13.0’] -> wrapt[version=’>=1.10.0,<1.11.0’]
  • pkgs/main/win-64::importlib_metadata==0.8=py37_0 -> zipp[version=’>=0.3.2’]
  • pkgs/main/win-64::path.py==11.5.0=py37_0 -> importlib_metadata[version=’>=0.5’]
  • pkgs/main/win-64::zipp==0.3.3=py37_1
  • pylint -> astroid[version=’>=2.2.0’] -> wrapt
  • spyder -> pylint -> astroid[version=’>=2.2.0’] -> wrapt
  • wrapt

Solution: I uninstalled wrapt and then used pip to download 1.11.2, which is the latest version.
After that step 4 is all fine.