Howto: installation on Windows

I would also not have a clue about why it worked after deactivation :(. Anyways, enjoy the course, best of luck!

After reinstalling Anaconda and Fastai I am baffled by the following error. Everything else works ok. Any suggestions?

When running lesson1-rf.ipynb it fails when executing:

draw_tree(m.estimators_[0], df_trn, precision=3)

returning:


FileNotFoundError Traceback (most recent call last)
D:\Nand\Anaconda3\envs\fastai\lib\site-packages\graphviz\backend.py in pipe(engine, format, data, quiet)
158 stdout=subprocess.PIPE, stderr=subprocess.PIPE,
–> 159 **POPEN_KWARGS)
160 except OSError as e:

D:\Nand\Anaconda3\envs\fastai\lib\subprocess.py in init(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors)
708 errread, errwrite,
–> 709 restore_signals, start_new_session)
710 except:

D:\Nand\Anaconda3\envs\fastai\lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session)
996 os.fspath(cwd) if cwd is not None else None,
–> 997 startupinfo)
998 finally:

FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

ExecutableNotFound Traceback (most recent call last)
D:\Nand\Anaconda3\envs\fastai\lib\site-packages\IPython\core\formatters.py in call(self, obj)
343 method = get_real_method(obj, self.print_method)
344 if method is not None:
–> 345 return method()
346 return None
347 else:

D:\Nand\Anaconda3\envs\fastai\lib\site-packages\graphviz\files.py in repr_svg(self)
104
105 def repr_svg(self):
–> 106 return self.pipe(format=‘svg’).decode(self._encoding)
107
108 def pipe(self, format=None):

D:\Nand\Anaconda3\envs\fastai\lib\site-packages\graphviz\files.py in pipe(self, format)
123 data = text_type(self.source).encode(self._encoding)
124
–> 125 outs = backend.pipe(self._engine, format, data)
126
127 return outs

D:\Nand\Anaconda3\envs\fastai\lib\site-packages\graphviz\backend.py in pipe(engine, format, data, quiet)
160 except OSError as e:
161 if e.errno == errno.ENOENT:
–> 162 raise ExecutableNotFound(args)
163 else: # pragma: no cover
164 raise

ExecutableNotFound: failed to execute [‘dot’, ‘-Tsvg’], make sure the Graphviz executables are on your systems’ PATH

<graphviz.files.Source at 0x21282fe9198>

Hi everybody,

do you happened to know should we change anything in the 8th step of Jeremy’s explanation in case we have activated fastai-cpu instead of fastai, as it is recommended on github. Particulary, i am suspicious about line mklink /d fastai …\fastai, but since i do not know fastai is for folder or environment, which is now differently named i ask you.

Thanks for your time and help :slight_smile:

My windows installation works just fine using Jupyter Notebook, but the exact same notebooks will throw a bcolz module not found error when launched in Jupyter Lab. Anybody know why this would be? I’ve tried a full uninstall and followed the steps here:

for what it’s worth here are my jupyter --paths:

(fastai) C:\Users\Will\fastai>jupyter --paths

config:
C:\Users\Will\.jupyter
C:\Users\Will\Anaconda3\envs\fastai\etc\jupyter
C:\ProgramData\jupyter

data:
C:\Users\Will\AppData\Roaming\jupyter
C:\Users\Will\Anaconda3\envs\fastai\share\jupyter
C:\ProgramData\jupyter

runtime:
C:\Users\Will\AppData\Roaming\jupyter\runtime

@Milica: I was able to get the CPU environment built (on Windows) by changing a line in the environment-cpu.yml file. The dependency that references ‘pytorch<0.4’ should be ‘pytorch-cpu<0.4’. Otherwise, the instructions are mostly the same (including step 8) except that:

  • In step 5 you use conda env update -f environment-cpu.yml
  • In step 6 you use conda activate fastai-cpu

(Also, you still have to deal with the fiona dependency as mentioned above…and you may eventually have to install mkl_fft, intel-openmp, numpy, and mkl using the command line and setting INCLUDE and LIB environment variables as mentioned above.)

@toddprater many thanks for your help. I have read and used your trick conda-forge::fiona>=1.7.13, so thank you for that as well. I will try, and sorry for slow response

Hi again,
I am trying to install Fastai for cpu users. I am running Windows 10 on Surface Laptop, and have two Anacondas (one for Python 2.7 and another for Python 3.6) i am not very skilled with bash as you could see.
I have some error that i have not seen so far on the Forum, so i do not know if it is appropriate to open a topic or not. Anyway, after running pytest tests I have seen the error ModuleNotFoundError for torchtext.
While running pip install torchtext I got a message that torchtext is successfully installed with a bunch of messages of uninstalled packages which I am not sure they are relevant:
image
Then I ran pytest tests and got the following errors:


Then I decided to install the version of libraries mentioned in previous message (PyHamcrest, hypothesis…). When I tried to install thinc due to “spacy 2.0.11 has requirement thinc<6.11.0,>=6.10.1, but you’ll have thinc 6.11.2 which is incompatible”, I have gotten the message: “failed building wheel for thinc” and for cytoolz too, due to
error: Microsoft Visual C++ 14.0 is required. Get it with “Microsoft Visual C++ Build Tools”: http://landinghub.visualstudio.com/visual-cpp-build-tools
The link is offline and then I have tried implicit trick from github error: Microsoft Visual C++ 14.0 is required and installed at the end Microsoft Visual Studio 2017.
image
At the end, yes there is, I run pytest tests and got the Assertion error ierror: Microsoft Visual C++ 14.0 is requiredn test_core.py
So question is whether you know how I could get rid of the last AssertionError and was it necessairy to install all libraries (PyHamcrest, thinc and so on)?
Please if you happened to know what to do whom I could ask for a help let me know.
Sorry for long story, I am very confused and beginner with installing things so I thought every detail is important.
Any suggestion about way of posting is welcome.

Thanks a lot for your time and hope we will learn something out of this adventure.
Best,
Milica

When I try to create the bellow

mklink /d fastai …\fastai

I ran into problems following these steps list out my @jeremy. I am using Windows 10 with Cuda toolkit 9.0 and 1 gtx 1080 as my gpu. The problem is mainly with installing Shapely and Fiona packages in Windows.

In my computer they could not be installed following the above steps with “conda env update” command. So I had manually download the “.whl” files for these packages and install with pip install, while activating the fastai conda env and then again deactivating the environment and do conda env update to properly install fastai.

In case someone is facing the same problem, just download these two packages from below, and pip install it manually activating the fastai environment.

https://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely

https://www.lfd.uci.edu/~gohlke/pythonlibs/#fiona


I got stuck with this in step 5 of the instructions. Please help!

Hi,
I followed the instructions and got stuck on the compile problem of fiona.
I simply added these lines at the beginning of environment.yml and the installation succesfully finished:
dependencies:

  • gdal
  • fiona
  • scipy>=1.0.0

I’m absolutely not an expert about this stuff and I didn’t understand exactly how dependencies work, but if you add these packages to the environment, maybe it will solve for other users without any manual operation or fiona rebuild.

Now I have another problem because I don’t have the data/dogscats/ folder and I don’t know how to launch the examples :slight_smile:

found:

I was able to get this running after running conda install graphviz

The other option seems like to setup an environment variable but I haven’t tried this.

Some SO posts I checked out to fix this:


Thank you Todd! Your comments were extremely helpful!

For anyone else that didn’t realize this, make sure you have activated the fastai environment prior to setting the Environment variables for this to work.

conda env update

I am actually looking for a dedicated IP for Windows. Where can I get this? I have shortlisted Ivacy, but not sure whether to go for it or not. I know my comment is not directly relevant to your query, but any assistance regarding this would help me big time.

Were you able to resolve this? I am getting the same error.

not yet

Adding dependency

  • conda-forge::fiona>=1.7.13

worked for me like a charm. Thanks!

Adding the “- conda-forge::fiona>=1.7.13” to environment.yml (insert into line 39) works for me on Windows 10.
As suggested by @neeravbm

3 Likes