Howto: installation on Windows

If you don’t have admin rights on the PC

You can try two things.
Copy the folder fastai to the folder where the notebook page is located.
or
include on top of your notebooks at the very beginning before the fastai stuff

import os
import sys
sys.path.append(“PATH TO THE FASTAI FOLDER”)

1 Like

I followed all steps from jeremys original post, however, when I run “lesson1.ipynb”, I receive the following error in line [3] from fastai.transforms import *

"AttributeError: module ‘torch’ has no attribute ‘float32’ "

1 Like

a reinstall of pytorch solved the problem for me:

(fastai)> conda uninstall pytorch
(fastai)> conda install pytorch -c pytorch

I received the following errors when running ‘conda env update’. Is this anything to worry about?

pexpect 4.6.0 requires ptyprocess>=0.5, which is not installed.

spacy 2.0.12 has requirement regex==2017.4.5, but you’ll have regex 2018.7.11 which is incompatible.

Thanks Jeremy!

I managed to run lesson1.ipynb on my laptop with NVIDIA GeForce 840M GPU with Windows 10 following your instructions. But the PyTorch version which got installed conda env update did not support my GPU. I got this error message:
Found GPU0 GeForce 840M which is of cuda capability 5.0.
PyTorch no longer supports this GPU because it is too old.

After scavenging the forums, I followed the instructions listed on this thread:

Finally, everything worked. But when I monitored CPU and GPU performance on Task Manager while learning, the learner’s GPU utilisation was around 2.5-3 percent whereas the CPU utilisation was much higher around 50 percent (in certain stages).

I wonder if this is normal. Thanks. In any case, being able to do deep learning on my own laptop feels nice.

What did you exactly to run an older card? :slight_smile: I have a DELL M6700 with a Quadro M4000 sending the same error…

Hello, first time setting up Anaconda on Windows.

During environment setup I got the following errors:

pexpect 4.6.0 requires ptyprocess>=0.5, which is not installed.
spacy 2.0.16 has requirement regex==2018.01.10, but you’ll have regex 2018.8.29 which is incompatible.

So i did:

python -m pip install --upgrade pip
python -m pip install spacy

I had to revert to regex-2018.1.10 from regex-2018.8.29 to install spacy. What this suppose to happen?

3 Likes

I’m on Windows 10 using Anaconda conda 4.5.11 python 3.6.6
After redoing the symlink to fastai I got errors about missing Module spacy
I then ran
conda install -c conda-forge spacy
some packages were downgraded and then I got missing Module dataclasses
after
conda install -c conda-forge dataclasses
some packages were downgraded
now I’ve got missing Moduie fastprogress

I can’t get PyTorch to use my GPU. It says that my graphics card is too old (Gtx 760). It says that PyTorch 0.3.0 will work but I can’t find it to install. Anyone find it? with instructions?

hello dear jeremy,

once i run spyder for the code: from fastai.structured import * , I will get this error: ModuleNotFoundError: No module named ‘fastai.structured’ but for the code: from fastai.imports import * I don’t get any error. I pip or install every thing and jupyter is available when i call it jupyter notebook in anaconda promp, My machine is running windows 10, and has enough space. thanks

To anyone experiencing this error when they run the 2nd cell of the first notebook of dl1 after having followed this guide, it is likely that the python files are missing from the old\fastai folder. This is strange, given that the files are present when you look at the github repo. For some reason, when cloning the repo, there is a saved commit that deletes all of the python files from old\fastai. I found this out by typing git status in the Anaconda Prompt. To roll back this change, I then entered git reset HEAD --hard, which reverts the commit that deletes all of those python files. You should be able to run the cell in Jupyter Notebook without any errors now.

This works for me as of October '18. If there are more errors I encounter, I will update this post when I have solutions.

I will also see about opening an issue on github to get this fixed.

1 Like

Hi all! Like many here, I’m also struggling to install Fast.ai on Windows. Here are my versions:
Windows 10 fully updated
Anaconda 3 with python 3.6.6

I followed the instructions from Jeremy in the first post. Everything goes smooth with no error messages. I then type “jupyter notebook” to launch a notebook.

As soon as I open lesson1.ipynb from within the Notebook browser window, I get a kernel error. Here is the message I get in the terminal window. Can someone help out? I read this thread, and did some basic Googling, and couldn’t find the issue.

Thanks in advance!

[E 09:52:10.228 NotebookApp] Failed to run command: ['C:/Users/herrk/Anaconda3/envs/fastai/bin/python', '-m', 'ipykernel_launcher', '-f', 'C:\\Users\\herrk\\AppData\\Roaming\\jupyter\\runtime\\kernel-c816842b-8813-4e6a-ac95-c2ca5bda5358.json'] PATH='C:\\Users\\herrk\\Anaconda3\\envs\\fastai\\Library\\bin;C:\\Users\\herrk\\Anaconda3\\envs\\fastai\\Library\\bin;C:\\Users\\herrk\\Anaconda3\\envs\\fastai;C:\\Users\\herrk\\Anaconda3\\envs\\fastai\\Library\\mingw-w64\\bin;C:\\Users\\herrk\\Anaconda3\\envs\\fastai\\Library\\usr\\bin;C:\\Users\\herrk\\Anaconda3\\envs\\fastai\\Library\\bin;C:\\Users\\herrk\\Anaconda3\\envs\\fastai\\Scripts;C:\\Users\\herrk\\Anaconda3\\envs\\fastai\\bin;C:\\Users\\herrk\\Anaconda3;C:\\Users\\herrk\\Anaconda3\\Library\\mingw-w64\\bin;C:\\Users\\herrk\\Anaconda3\\Library\\usr\\bin;C:\\Users\\herrk\\Anaconda3\\Library\\bin;C:\\Users\\herrk\\Anaconda3\\Scripts;C:\\Users\\herrk\\Anaconda3\\bin;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v9.0\\bin;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v9.0\\libnvvp;C:\\Program Files\\Python36\\Scripts\\;C:\\Program Files\\Python36\\;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\Intel\\iCLS Client\\;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\Program Files\\Intel\\iCLS Client\\;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Users\\herrk\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\herrk\\AppData\\Local\\GitHubDesktop\\bin' with kwargs: {'stdin': -1, 'stdout': None, 'stderr': None, 'cwd': 'c:\\Users\\herrk\\Work\\fast.ai\\fastai\\courses\\dl1'}

[E 09:52:10.271 NotebookApp] Uncaught exception POST /api/sessions (::1)
HTTPServerRequest(protocol=‘http’, host=‘localhost:8888’, method=‘POST’, uri=’/api/sessions’, version=‘HTTP/1.1’, remote_ip=’::1’, headers={‘Host’: ‘localhost:8888’, ‘User-Agent’: ‘Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0’, ‘Accept’: ‘application/json, text/javascript, /; q=0.01’, ‘Accept-Language’: ‘en-US,en;q=0.5’, ‘Accept-Encoding’: ‘gzip, deflate’, ‘Referer’: ‘http://localhost:8888/notebooks/courses/dl1/lesson1.ipynb’, ‘Content-Type’: ‘application/json’, ‘X-Xsrftoken’: ‘2|db5454b7|0ee7dae5a4ee72daa2614e7c775c5572|1540318360’, ‘X-Requested-With’: ‘XMLHttpRequest’, ‘Content-Length’: ‘102’, ‘Connection’: ‘keep-alive’, ‘Cookie’: ‘username-localhost-8888=“2|1:0|10:1540806713|23:username-localhost-8888|44:YzE1NTljZmI4ZTVjNGY2MTk4YzUwNDhkMDQwNDdlZGU=|9812ac94e99c5462f80005a929c7fd8a4355a84413fca8940c6f558a8b7f7f9b”; _xsrf=2|db5454b7|0ee7dae5a4ee72daa2614e7c775c5572|1540318360’})
Traceback (most recent call last):
File “C:\Users\herrk\Anaconda3\envs\fastai\lib\site-packages\tornado\web.py”, line 1512, in _execute
result = yield result
File “C:\Users\herrk\Anaconda3\envs\fastai\lib\site-packages\tornado\gen.py”, line 1055, in run
value = future.result()
File “C:\Users\herrk\Anaconda3\envs\fastai\lib\site-packages\tornado\concurrent.py”, line 238, in result
raise_exc_info(self._exc_info)
File “”, line 4, in raise_exc_info
File “C:\Users\herrk\Anaconda3\envs\fastai\lib\site-packages\tornado\gen.py”, line 1063, in run
yielded = self.gen.throw(*exc_info)
File “C:\Users\herrk\Anaconda3\envs\fastai\lib\site-packages\notebook\services\sessions\handlers.py”, line 73, in post
type=mtype))
File “C:\Users\herrk\Anaconda3\envs\fastai\lib\site-packages\tornado\gen.py”, line 1055, in run
value = future.result()
File “C:\Users\herrk\Anaconda3\envs\fastai\lib\site-packages\tornado\concurrent.py”, line 238, in result
raise_exc_info(self._exc_info)
File “”, line 4, in raise_exc_info
File “C:\Users\herrk\Anaconda3\envs\fastai\lib\site-packages\tornado\gen.py”, line 1063, in run
yielded = self.gen.throw(*exc_info)
File “C:\Users\herrk\Anaconda3\envs\fastai\lib\site-packages\notebook\services\sessions\sessionmanager.py”, line 79, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File “C:\Users\herrk\Anaconda3\envs\fastai\lib\site-packages\tornado\gen.py”, line 1055, in run
value = future.result()
File “C:\Users\herrk\Anaconda3\envs\fastai\lib\site-packages\tornado\concurrent.py”, line 238, in result
raise_exc_info(self._exc_info)
File “”, line 4, in raise_exc_info
File “C:\Users\herrk\Anaconda3\envs\fastai\lib\site-packages\tornado\gen.py”, line 1063, in run
yielded = self.gen.throw(*exc_info)
File “C:\Users\herrk\Anaconda3\envs\fastai\lib\site-packages\notebook\services\sessions\sessionmanager.py”, line 92, in start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File “C:\Users\herrk\Anaconda3\envs\fastai\lib\site-packages\tornado\gen.py”, line 1055, in run
value = future.result()
File “C:\Users\herrk\Anaconda3\envs\fastai\lib\site-packages\tornado\concurrent.py”, line 238, in result
raise_exc_info(self._exc_info)
File “”, line 4, in raise_exc_info
File “C:\Users\herrk\Anaconda3\envs\fastai\lib\site-packages\tornado\gen.py”, line 307, in wrapper
yielded = next(result)
File “C:\Users\herrk\Anaconda3\envs\fastai\lib\site-packages\notebook\services\kernels\kernelmanager.py”, line 160, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File “C:\Users\herrk\Anaconda3\envs\fastai\lib\site-packages\jupyter_client\multikernelmanager.py”, line 110, in start_kernel
km.start_kernel(**kwargs)
File “C:\Users\herrk\Anaconda3\envs\fastai\lib\site-packages\jupyter_client\manager.py”, line 259, in start_kernel
**kw)
File “C:\Users\herrk\Anaconda3\envs\fastai\lib\site-packages\jupyter_client\manager.py”, line 204, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File “C:\Users\herrk\Anaconda3\envs\fastai\lib\site-packages\jupyter_client\launcher.py”, line 128, in launch_kernel
proc = Popen(cmd, **kwargs)
File “C:\Users\herrk\Anaconda3\envs\fastai\lib\subprocess.py”, line 709, in init
restore_signals, start_new_session)
File “C:\Users\herrk\Anaconda3\envs\fastai\lib\subprocess.py”, line 997, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
[W 09:52:10.346 NotebookApp] Unhandled error
[E 09:52:10.351 NotebookApp] {
“Host”: “localhost:8888”,
“User-Agent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0”,
“Accept”: “application/json, text/javascript, /; q=0.01”,
“Accept-Language”: “en-US,en;q=0.5”,
“Accept-Encoding”: “gzip, deflate”,
“Referer”: “http://localhost:8888/notebooks/courses/dl1/lesson1.ipynb”,
“Content-Type”: “application/json”,
“X-Xsrftoken”: “2|db5454b7|0ee7dae5a4ee72daa2614e7c775c5572|1540318360”,
“X-Requested-With”: “XMLHttpRequest”,
“Content-Length”: “102”,
“Connection”: “keep-alive”,
“Cookie”: “username-localhost-8888=“2|1:0|10:1540806713|23:username-localhost-8888|44:YzE1NTljZmI4ZTVjNGY2MTk4YzUwNDhkMDQwNDdlZGU=|9812ac94e99c5462f80005a929c7fd8a4355a84413fca8940c6f558a8b7f7f9b”; _xsrf=2|db5454b7|0ee7dae5a4ee72daa2614e7c775c5572|1540318360”
}
[E 09:52:10.358 NotebookApp] 500 POST /api/sessions (::1) 195.10ms referer=http://localhost:8888/notebooks/courses/dl1/lesson1.ipynb

Hello, Windows is a difficult environment for Python-based projects like ours. We do not provide our own packages for Windows. Instead, we partner with who provides builds containing Review Board , These are available as standalone installers and virtual machines. if you facing any problem regarding Dell Laptop support number you can visit here.

Thanks for these instructions, they worked find for me with Windows 10 and GeForce GTX 1060 6GB.

The only issue I’m finding is that I need to update notebook code where path strings are defined. I don’t know whether use of pathlib would address this.

I had the same issue with moduleNotFoundError: No module named 'fastai.imports' due to python files missing from old\fastai\ and I can confirm that the fix below works, thank you!

1 Like

I was getting the issue to update my windows 8 and getting error code 0x80004005. I tried windows error code 0x80004005 for the help purpose and got the best result.

My environment details are

windows 10
CUDA 10
GPU Compute Capability 3, Nvidia Quadro K1000M
anaconda 3

For running FASTAI tutorials, I built pytorch from source and while running the lesson 1, I am getting following error:

cuda runtime error (48) : no kernel image is available for execution on the device at c:\anaconda2\conda-bld\pytorch_1519501749874\work\torch\lib\thc\generic/THCTensorMath.cu:15

The error refers to a path which is not even there on my system.
What should i do?

Hello,

I am getting a ‘‘SpecNotFound: Can’t process without a name’’ error on executing conda env create -f environment-win.yml. I found that in the fastai dir there is no environment-win.yml file. I have a environment-.yml
and a environment-cpu.yml file. I have a gpu on my machine. Which env to use?

One more tip for the Windows installation.

If you install Cuda first you can query whether the PyTorch bundled with Fast.Ai does actually support your graphics card.

You can run:
"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\extras\demo_suite\deviceQuery.exe"

Which should contain a line like:

CUDA Capability Major/Minor version number: 3.0

if that version is 5.0 or lower (like the one above) pytorch will not support your graphics card.
As per PyTorch v0.3.1

Not sure what the effect on 7.5 is though.

Did everything on this tutorial, but after i try to import fastai.imports i get the error “ModuleNotFoundError: No module named ‘dataclasses’”. Running on a Windows 10 64bit, NVIDIA GTX 1060 with 416 driver installed and did everything stated in the main post