Howto: installation on Windows


Hi, I have this error:

I have a laptop with an Nvidia GT 630M. I tried to update its drivers and reboot my computer but the error is still there. Any sugestions? Thank you.

(Tiri) #184

I got the same problem exactly (on windows 7), and to fix it, i just needed to update conda!
so after the cd fastai, please try to launch conda update conda
and then the conda env update command.

(Jonas G F Pettersson) #185

As already mentioned in this thread, the PyTorch support for NVIDIA cards with compute capability <= 5 has ended. This means that my Windows-approach to deep learning does not work anymore. I spent considerable effort to make it work on Windows (because I had a laptop from my employer and wanted to use the GPU for something meaningful :slight_smile: ) but unfortunately I have to dismiss the idea and go back to AWS (which is not bad in anyway, but more expensive). It was clear from the start that these Windows laptops were not meant for deep learning, but as long as PyTorch support was given it worked out well. Now I have to give up unfortunately. That is my conclusion…


Great news!


If you think your GPU is doing nothing, please note that in the task manager in the GPU view you can change one of the four diagrams to “Compute_0” and this will show it’s busy, just not with rendering 3D.

(Jonas G F Pettersson) #188

Really good news! Thank you for informing us!

(nok) #189

The support is back for PyTorch 0.4.0 and window is officially supported now, you can check out Pytorch homepage.

(Igor Kasianenko) #190

Hi @raelianer ,
Did you run any code that contains code m_vgg = to_gpu(vgg16(True)).eval() with to_gpu function?
I did part1 on my windows laptop with 960m, but now on part 2 I get error
" Found GPU0 GeForce GTX 960M which is of cuda capability 5.0." " PyTorch no longer supports this GPU because it is too old."

cd to fastai directory in conda and writing conda env update installs pytorch 4 and this error is gone! All works. No need to install wheel or compile from source.


I just used conda install pytorch cuda91 -c pytorch - I tried conda env update afterwards and the problem came back.

I discovered like two days ago, so all I’ve done so far is watching lesson one and running all cells of the jupyter notebook, which took about 1h 30m on my laptop (the second time I run it).

However after the update I get this warning:

C:\Users\Richard\fastai\courses\dl1\fastai\ UserWarning: nn.init.kaiming_normal is now deprecated in favor of nn.init.kaiming_normal_.
if hasattr(m, ‘weight’): init_fn(m.weight)

I also wanted to pip3 install torchvision but since it was running fine without it and it comes with it’s own dependencies I decided to spare me the hassle.

(Jonas G F Pettersson) #192

Works well, also for Windows 7.
I just executed
conda install pytorch cuda90 -c pytorch
in addition to the Windows 7 installation oulined above

(Pierre Guillou) #193

@jeremy, in the jupyter notebook lesson4-imdb.ipynb, we use the find command which does not work in Anaconda Prompt (but works in Ubuntu terminal).

The code is : find {TRN} -name '*.txt' | xargs cat | wc -w (with an exclamation point before find if the code is run in the notebook).

Which code can I use instead ?

(Yujun) #194

Thanks! I tried everything in this post and this final solution solved my issue. I had a CUDA 8.0 before I am not sure if this causes the issue. But Installing CUDA 9.0 works.

(Kritika) #195

Please correct me if I understood this wrong.

Mine is a Windows 10 machine with 4GB GTX 1050.
I downloaded CUDA 9.0 and Cudnn 7.0.5 and Tensorflow 1.5 for GPU
Now, following the steps here will make my machine ready for the fastai course? Will I not have to install pytorch and all those stuff ?

(Kritika) #196

Update: Everything seems to be working fine for me. Here’s a snapshot. If someone can look at it and let me know if this is what we would expect on GPU usage

Thanks :slight_smile:!

(Aditya) #197

But there should be compute options showing up instead of Video Encode/Decode…(except that seems okaish)

Also try switching the display options (a right click on task manager graph)

Also whats your epoch time?(this will surely make it clear)

Also the lib is Using PyTorch not tf…

(Rohit Kumar Singh) #198

Hello Jeremy,

Is it essential to install all the dependencies to activate fastai environment.i have run “conda env update” but couldn’t install mkl and cudnn due to internet problem. And if I run “activate fasti” it shows error that “fastai” env is not present. Also, fastai env is not listed using “conda info --envs”.

(Rohit Kumar Singh) #199

I guess the answer to my question will be yes. Because I tried to run “conda env create -f environment.yml” it also tried to install cudnn and mkl only and when I cancelled those two installations dependencies installation terminated. And when I tired to find “fastai” env using “conda info --envs” no luck again.

(Amar Sharma) #200

GPU usage is expected because of your learner. Great job!

(Davide Boschetto) #201

Reviving this thread with a problem I have.
I’m trying to install everything on a new PC (windows 10), where I can’t install Anaconda.
I’m using the old Git trick (pip install git+, but it fails given that one of the requirements is “torch<0.4”, which is not available on PyPI (or on Windows, anyhow).

Same thing if I do “pip install fastai”: it fails on torch too.

Any help?
(Silly question, but I can’t make it!)

(Will) #202

Anybody know if it is recommended to call “activate fastai” or “conda activate fastai” ?

I’ve been running the former so as to follow the instructions but admittedly I’m not familiar with the difference.