Howto: installation on Windows


(Josh Cooper) #243

I had the same issue and couldn’t get it to work even after installing GDAL, Fiona binaries, etc. I finally managed to get it to work by building Fiona from source.
I installed GDAL using the OSGeo installer (https://live.osgeo.org/en/win_installers.html). Then after cloning the Fiona repository you need to pass the locations of the GDAL include and lib folders, as well as the installed GDAL version. For me this was:

python setup.py build_ext -I "C:\OSGeo4W64\include" -lgdal_i -L "C:\OSGeo4W64\lib" install --gdalversion 2.2.4

Note that I only tested installing fastai via running python setup.py install. However, I was getting the same error using either installation method yesterday.


#244

Is that possible to skip the Fiona, my running conda env update also gets stuck in this step.


#245

Hi @pverma, have you solved the problem related to Fiona? I am having the same problem.


(Divyanshu) #246

I Did everything that was asked in the tutorial except the last step of linking cause my computer is giving error i dont have enough permissions even though i was running that in admin mode. SO i ran jupyter as it is and it loaded as expected but gave error no module named fastai while importing fastai packages.Please anyone help?


(prashant verma) #247

I was a able to manually install fiona but conda env update couldn’t find it. Unfortunately, I didn’t find any solution to that.


(Todd Prater) #248

I was finally able to get everything installed (after manually installing GDAL) by setting the following environment variables before I ran conda install -c conda-forge fiona:

set INCLUDE=C:\path-to-gdal\include
set LIB=C:\path-to-gdal\lib

Then I ran conda env update.

Also (@divyanshu97) remember to create the symlink to the fastai directory as per the instructions in the first post in this thread (may require elevated/admin command shell?):

cd courses\dl1
del fastai
mklink /d fastai ..\..\fastai
cd ..\..

Edit: Updated this post to reflect that after tying to reproduce, I found that I must have installed fiona separately from updating the environment.


(Divyanshu) #249

Now it is giving the error PATH dogs/cats not found


#250

@pverma, I also tried to install Fiona first, which was successful, but running conda env update still returns the same error message related to Fiona.


(Deborah Tylor) #251

I too was stuck on a fiona related problem in Windows 10 install of fastai. I tried a lot of things and finally it worked. I’m listing some of the steps here. At first I tried the installation from this post with conda env update, which kept failing on the fiona step. I downloaded GDAL and followed these instructions earlier: https://github.com/Toblerity/Fiona/blob/master/README.rst#windows
including GDAL but it still didn’t work. Then I removed the fastai environment
conda env remove -n fastai
and followed old instructions for Windows 10 on How to set up Windows 10 for fast.ai
Here are the series of commands that seemingly randomly led to it working. (Sorry I wish I had more succinct advice)
conda create -n fastai python=3.6 numpy cython statsmodels opencv
activate fastai
conda install -c peterjc123 pytorch cuda90
pip install fastai (error received fiona related)
python -m pip install --upgrade pip
pip install fastai (error received fiona related)
conda install -c conda-forge geopandas
conda remove geopandas fiona
pip install geopandas fiona (error received fiona related)
pip install Fiona-1.7.13-cp36-cp36m-win_amd64.whl
(downloaded from https://www.lfd.uci.edu/~gohlke/pythonlibs/#fiona)
pip install geopandas fiona
pip install fastai
python -m ipykernel install --user --name fastai --display-name “fastAI custom”
jupyter notebook


(Josh Cooper) #252

Have you tried building Fiona from source rather than just installing the binary? Its pretty likely the issue is caused by conda not knowing to point the Fiona install script towards the GDAL include and lib. It looks like toddprater had success just by setting the environment variables before updating the environment.


#253

Hi Josh, should I just type these two “set environment” under the Annoconda command prompt, or set these environment variables using Windows environment setting tool? Thanks.


(Todd Prater) #254

I just set the environment variables in the shell before I ran the conda env update command. I don’t think you’d want to set those globally. Actually, just this morning I went back to see if I could make it work from scratch and found that I must have installed fiona (from conda-forge) before updating the environment:

conda install -c conda-forge fiona

Or, you could just add the line under dependencies in the environment.yml file:

- conda-forge::fiona>=1.7.13

And then just a single conda env update should work.


(hepy) #255

It works, thank you very much!!:sunglasses::sunglasses::sunglasses:


#256

How did you installed GDAL?
I tried to install GDAL core, but at the path-to-gdal I don’t have “include” and “lib” library.
I have: “charp”, “gdal-data”, “gdalplugins”, “licence”, “projlib”


(Todd Prater) #257

@talz: I downloaded from the GIS Internals site. I chose the MSVC 2017/x64 package and then downloaded both the ‘compiled binaries’ ZIP file and the ‘libraries and headers’ ZIP file. Then I just extracted those into a directory (C:\path-to-gdal).


(sameer sharma) #258

Hi Guys,
I am trying to get started with this course on a Windows 10 machine equipped with the 960M NVIDIA GPU. I was able to follow steps 1 to 4 without much issues. However, I am stuck with an error that the Anaconda prompt throws at Step 5 (conda env update). Can someone please help me get past this error?


Thanks,


(Hisham) #260

I’m facing the same problem ! can anyone help?


(Hisham) #261

hello, I was able to solve this by installing geopandas independently, but then got stuck with waht every body is complaining about … the Fiona thing ! Have been trying to slove it since yesterday but to no avail !


(sameer sharma) #262

Finally, I was able to install everything without any fuss. Here is what I did:

  1. conda remove -n fastai --all
  2. conda clean --all
  3. Steps 1 - 4 from Jeremy’s post
  4. Follow Todd’s guidelines
  1. Follow Jeremy’s steps 5 - 8

That’s it!


(Hisham) #263

@sameersharmadc thanks a lot … that worked and everything installed correctly and completed all the steps exactly as you mentioned. However after that when I try to launch jupyter I get this:

When I deactivate fastai and run the command on the base environment it works !
I don’t understand where the issue is?