Howto: installation on Windows

(Kaleo Brandt) #163

@vikasbahirwani How do the CPUs compare on these two boxes? Training seems to be heavily CPU bound, to the point that I and many others have initially thought it wasn’t using our GPUs at all.
A couple other things to verify would be disk I/O and RAM read/write rates. M.2 drives can be much faster than SATA SSDs.

(Harsh Sharma) #164

unable to solve this error

(Rohit SIngh) #165

@jeremy I tried for almost 3 hours and searched the forum for almost an hour. I wasn’t able to find anything other than this thread.

I can’t financially support for the cloud service.
I have a 2GB radeon enabled graphics processor.
I’ve been trying to do the above mentioned steps but have failed every time and these errors

keep showing.
Please Help me to solve this.
I badly want to successfully complete this course and step towards Deep Reinforcement Learning.

(Jeremy Howard (Admin)) #166

You should use Google Colab, which is free. You can’t use a 2GB card, or an AMD card, for this course.

(Please don’t at-mention me, unless it’s a question specific to me personally)

(Rohit SIngh) #167

I really apologize for that.
I’ve been using colab for some days but how am i supposed to install the whole fastai environment in it.

(Jeremy Howard (Admin)) #168

This is discussed in many forum threads.

(Vikas Bahirwani) #169

Thank you. I will take a look.

Do you know why the training is CPU heavy? Augmentation?

(Rohit SIngh) #170

Thank you for everything. I was finally able to set up everything.

(Chad Tarbutton) #171


Great videos. Can’t express it enough how easy you make this. Learning Deep learning from scratch and moving right along. Your setup for my windows install worked flawlessly.

Can’t wait to make it all the way through your series.

(Will) #172

So, as a noob, I have a followup question.

I have the windows install running great on all notebooks. However, I would like to do a Git pull to update my fastai library.

Can i simply go to the command line and run:

git clone

or do i need to go through all of the installation steps again? I’m afraid to experiment with this on my own as i have everything working and lack the skill to repair it if I break something.

(nok) #173

I try update my driver and suddenly it find CUDA now.

(Kaleo Brandt) #174

Yeah, it’s fine. You’ll have to re-do step 8 (changing the symlink).
If something really goes wrong, you can just delete the whole fastai directory and re-run these installation steps.

(Lalit A Patel) #175

@jeremy Thank you for excellent and useful write-up on installation on Windows.

@Oonej and others: I will appreciate your help on the following.

“from fastai.imports import *” cell in lesson1 in Jupyter Notebook on my computer leads to the following error.

ImportError                               Traceback (most recent call last)
<ipython-input-2-2f3a3d7866ce> in <module>()
      1 # This file contains all the main external libs we'll use
----> 2 from fastai.imports import *

C:\Windows\System32\fastai\courses\dl1\fastai\ in <module>()
     13 from pandas_summary import DataFrameSummary
     14 from IPython.lib.display import FileLink
---> 15 from PIL import Image, ImageEnhance, ImageOps
     16 from sklearn import metrics, ensemble, preprocessing
     17 from operator import itemgetter, attrgetter

C:\Programs\Anaconda3\lib\site-packages\PIL\ in <module>()
     56     # Also note that Image.core is not a publicly documented interface,
     57     # and should be considered private and subject to change.
---> 58     from . import _imaging as core
     59     if PILLOW_VERSION != getattr(core, 'PILLOW_VERSION', None):
     60         raise ImportError("The _imaging extension was built for another "

ImportError: DLL load failed: The specified module could not be found.

(tushar) #176

Guys I am getting an error of kernel dead for fastai lesson1-rxt50 , I am using “custom_kernel” as mentioned in other threads. I am working on google compute console with 52GB ram and 8 CPU on ubuntu 16.04. Please someone help me out. thanks ,

(Pierre Guillou) #177

It means that Ubuntu for Windows can not be used in order to get Fastai running on a GPU on Windows ?

(Jeremy Howard (Admin)) #178

Correct. No CUDA support in WSL

(Pierre Guillou) #179


I have questions about your process that does not work until now on my computer (windows 10, GeForce GTX 1070) :

  1. Why do we install Git for Windows as we don’t open it after ?
    EDIT : I got it (it installs in Anaconda Prompt Terminal the git functions and even the unix commands if selected during the installation process)

  2. I can not use the command del in my Anaconda Prompt Terminal, only rmdir : you know why ?
    EDIT : it works now after a new installation of GIT for Windows with the Unix Command option selected.

  3. I followed your howto guide but I got at the end a “Kernel error” after launching my jupyter notebook with the following list or errors :
    EDIT : my kernel python3 works now. It was my kernel.json at C:\Users%username%\AppData\Roaming\jupyter\kernels\python3\kernel.json that had an old path to python.exe

Traceback (most recent call last):
  File "C:\Users\alienware\Anaconda3\envs\fastai\lib\site-packages\tornado\", line 1512, in _execute
    result = yield result
  File "C:\Users\alienware\Anaconda3\envs\fastai\lib\site-packages\tornado\", line 1055, in run
    value = future.result()
  File "C:\Users\alienware\Anaconda3\envs\fastai\lib\site-packages\tornado\", line 238, in result
  File "<string>", line 4, in raise_exc_info
  File "C:\Users\alienware\Anaconda3\envs\fastai\lib\site-packages\tornado\", line 1063, in run
    yielded = self.gen.throw(*exc_info)
  File "C:\Users\alienware\Anaconda3\envs\fastai\lib\site-packages\notebook\services\sessions\", line 73, in post
  File "C:\Users\alienware\Anaconda3\envs\fastai\lib\site-packages\tornado\", line 1055, in run
    value = future.result()
  File "C:\Users\alienware\Anaconda3\envs\fastai\lib\site-packages\tornado\", line 238, in result
  File "<string>", line 4, in raise_exc_info
  File "C:\Users\alienware\Anaconda3\envs\fastai\lib\site-packages\tornado\", line 1063, in run
    yielded = self.gen.throw(*exc_info)
  File "C:\Users\alienware\Anaconda3\envs\fastai\lib\site-packages\notebook\services\sessions\", line 79, in create_session
    kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
  File "C:\Users\alienware\Anaconda3\envs\fastai\lib\site-packages\tornado\", line 1055, in run
    value = future.result()
  File "C:\Users\alienware\Anaconda3\envs\fastai\lib\site-packages\tornado\", line 238, in result
  File "<string>", line 4, in raise_exc_info
  File "C:\Users\alienware\Anaconda3\envs\fastai\lib\site-packages\tornado\", line 1063, in run
    yielded = self.gen.throw(*exc_info)
  File "C:\Users\alienware\Anaconda3\envs\fastai\lib\site-packages\notebook\services\sessions\", line 92, in start_kernel_for_session
    self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
  File "C:\Users\alienware\Anaconda3\envs\fastai\lib\site-packages\tornado\", line 1055, in run
    value = future.result()
  File "C:\Users\alienware\Anaconda3\envs\fastai\lib\site-packages\tornado\", line 238, in result
  File "<string>", line 4, in raise_exc_info
  File "C:\Users\alienware\Anaconda3\envs\fastai\lib\site-packages\tornado\", line 307, in wrapper
    yielded = next(result)
  File "C:\Users\alienware\Anaconda3\envs\fastai\lib\site-packages\notebook\services\kernels\", line 148, in start_kernel
    super(MappingKernelManager, self).start_kernel(**kwargs)
  File "C:\Users\alienware\Anaconda3\envs\fastai\lib\site-packages\jupyter_client\", line 110, in start_kernel
  File "C:\Users\alienware\Anaconda3\envs\fastai\lib\site-packages\jupyter_client\", line 259, in start_kernel
  File "C:\Users\alienware\Anaconda3\envs\fastai\lib\site-packages\jupyter_client\", line 204, in _launch_kernel
    return launch_kernel(kernel_cmd, **kw)
  File "C:\Users\alienware\Anaconda3\envs\fastai\lib\site-packages\jupyter_client\", line 128, in launch_kernel
    proc = Popen(cmd, **kwargs)
  File "C:\Users\alienware\Anaconda3\envs\fastai\lib\", line 709, in __init__
    restore_signals, start_new_session)
  File "C:\Users\alienware\Anaconda3\envs\fastai\lib\", line 997, in _execute_child
FileNotFoundError: [WinError 2] Le fichier spécifié est introuvable
  1. My last error now is about ModuleNotFoundError: No module named 'bcolz'
    EDIT : it works now. It was again the wrong path to my python.exe in my kernel.json file.

(Raymond) #180

Following Jeremy post for custom installation in windows 10 with Nvidia GPU, I am stuck at conda env update
I did below steps,

  1. Already have Anaconda with Python=3.6 and Git.
  2. Opened Anaconda Prompt as admin
  3. Did git clone'
  4. then cd fastai/fastai in which environment.yml is available.
  5. then when I do conda env update I get below error.
  - spacy

then based on few answers in above posts and in this link Lesson 4 - OSError: Can't find model 'en',
I ran below two commands and installed & downloaded spacy model successfully

pip install spacy
python -m spacy download en

then when I try to run 5th step again to proceed, I get same ResolvePackageNotFound spacy error. Other people are facing this problem when they run lesson4 notebooks, but I am facing during initial installation itself. Even after installing spacy why am I getting this error, can someone tell me how to proceed further? I have already went through most of the posts available and have been stuck for many hours on this issue.

(nok) #181

If you install spacy already, try remove spacy from the environment file and rerun env update, I am guessing this files have been updated recently.

(David Kagan) #182

I had the same issue, while attempting to use torch on CPU, what solved it for me is to uninstall pytorch
and install the pytorch-cpu version:

conda uninstall pytorch
conda install -c peterjc123 pytorch-cpu

It’s probably not relevant for you anymore but maybe it will help to someone else…