Installation [Windows]


(Kostya Kilimnik) #23

It is good for Windows 10 users, unfortunately not supported for Windows 7.
I had to add python/make to cygwin, reinstall pip for cygwin as suggested above and remove anaconda from PATH.
only after verifing ‘which python’ and ‘which pip’ retrieve /usr/bin/python and /usr/bin/pip, I reran pip awscli and got aws in place


(Sahil KARKHANIS) #24

As suggested by Jeremy, bash for windows works perfectly fine! I only hope the other steps also work the same way. :slight_smile:


(Emilio) #25

After multiple attempts, it looks like Cygwin does not install a PIP command, but PIP2 and PIP3.

As a result, I solved by typing pip2 install awscli.
That put aws in place correctly for me and I am now able to use the aws command.


(carlos roberto) #26

Hi @erlapi
I guess pip is an alias when you have only one Python version installed. But, when you have more than one Python version installed, eg. Python 2.x and Python 3.x, and you want to differentiate which Python version you want to use, then you name the command pip2 and pip3. AFAIK, the first part of this course, make use of Python 2. So, installing pip2 will match the requirements.
Regards.


(Emilio) #27

Yes @carlosdeep, Cygwin installs both, so the correct syntax is to call the version you need as you said.
My point is that , it doesn’t look like it installs a PIP command, but only PIP2 or PIP3.
Then the user should pick the one compatible to her/his python version as you said.


(Gerald M Monroe) #28

Ok, Windows 10 wasn’t that hard. I wish there were GPU instructions - it’s straightforward and you don’t need Cygwin or AWS if you have a recent Nvidia GPU.

Well, it wouldn’t have been hard if I’d had a complete set of instructions. 7 hours later, I got it to finish the cat/dog dataset with GPU acceleration. Anaconda install was straightforward, and conda worked ok for adding dependencies. The instructions on their website for theano and karas worked ok. There were 2 different bugs that broke it - it uses hugely long path names, which break in windows, and I had to downgrade keras to 1.2.2 or it wouldn’t work.

I had to guess it wanted Python 2.7, was correct.

Then, naturally, you have to create an account to be allowed to download the neural net CUDA stuff, and I had to guess that MSVC version 2013 was not too new but not too old that it would work. (MSVC has abysmal compatibility forward and back, you basically need the exact correct version of the compiler) And I had to add it to the path or it wouldn’t work.

Then I find out the data set download is long gone, and I had to make up the data set. I found out that Windows 10 has some horrific optimization and even with an SSD and a machine with 32 gb of RAM, it took a long time to create two folders with dogs in one and cats in the other. Maybe I should have used a batch file or written a script for it.

After all that, I’m getting ~300 second runtimes. Nothing spectacular. I’ve noticed that my GPU seems to average only about 60% load when processing the dataset, so maybe there’s settings that can be tweaked.

NOTE : NO Cygwin. NO Bash for Windows. Both are counterproductive and useless! (I wasted time installing Cygwin, then deleted it, and Bash for windows is just going to put a bunch of native linux stuff on your machine that will NOT work with the GPU acceleration so it’s a waste of time! About 3 of the 7 hours are wasted because both were suggested above…)


(Jeremy Howard) #29

Would be great if you could document the exact steps for others, if you have a chance. Thanks a lot for sharing your tips.

What data set couldn’t you find?


(Gerald M Monroe) #30

The cat/dog split database. The link you gave in your video no longer works. And the download tool froze on me. So I just made an account on fraggle and downloaded the data myself, then used the windows search box to select all files with the word “cat” in them and made my own split data set similar to the one you had. Not too mentally difficult - but it was time consuming because apparently, Windows 10 is slow as a snail at this. Even though I am using an SSD and I was using “move” which should just mean an update to a file allocation pointer. But what I found most annoying about it was that I wasn’t sure it was ever going to work. Since there’s no Windows GPU instructions, I thought maybe some bug somewhere prevents it from working at all, and at that point, it was finally about to work and now I have to spend 30 minutes re-creating the data.

I mean, it’s free. The paid courses from Georgia Tech on udacity are smoother, but yours is probably better. So I shouldn’t complain too much, and maybe it builds character to beat at a problem like this for a bit :slight_smile:


(carlos roberto) #31

@Gmonroe
Maybe this link can help you to download the dataset
https://www.microsoft.com/en-us/download/details.aspx?id=54765&WT.mc_id=rss_alldownloads_devresources


(Alexandre Cadrin-Chênevert) #32

I installed tonight the course setup on my windows 7 laptop with GTX 660M. I didn’t test the jupyter notebooks from part I but I can import these modules with no error in python 3.5.3 :
Keras 2.0.4, Theano 0.9.0, Tensorflow with gpu 1.1.0, numpy, matplotlib, scipy, scikit-learn, mingw, libpython, pyyaml, HDF5 and h5py

Here are the steps I used. Some steps are probably redundant for some configs and probably not bulletproof for some other configs :

  1. Confirm that your graphic card is Cuda-capable (http://developer.nvidia.com/cuda-gpus)
  1. Install Visual Studio 2013 or 2015 IDE (2017 not supported by CUDA right now)
    (https://www.visualstudio.com/en-us/news/releasenotes/vs2013-community-vs)
  2. Install Visual C++ 2015 redistribuable
    (https://www.microsoft.com/en-us/download/details.aspx?id=53840)
  3. Install CUDA 8.0
    (https://developer.nvidia.com/cuda-downloads)
  4. Install cuDNN 5.1 (6.0 not actually supported by tensorflow); copy the extracted files from the lib/include/bin directories to the same directories in CUDA V8.0 directory
    (https://developer.nvidia.com/cudnn)
  5. Install Anaconda 4.3.1 for python 3.6
    (https://www.continuum.io/downloads)
  6. From the anaconda prompt, create a virtual environment:
    conda create -n py35 python=3.5
  7. Activate the virtual environment:
    activate py35
  8. Check if the PATH variable links to Anaconda and CUDA lib and bin directories. Add the directories if necessary to the PATH variable with the set command
  9. Check if the file msvcr140.dll (Visual C++ 2015) is on your computer and the PATH variable includes the directory
  10. Install the following dependencies in py35 environment
    conda install numpy matplotlib scipy scikit-learn
  11. Install Tensorflow GPU in py35 environment
    pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-1.1.0-cp35-cp35m-win_amd64.whl_
    Take a look at https://www.tensorflow.org/install/install_windows
  12. Install theano dependencies
    conda install mingw libpython
  13. Install theano
    conda install theano
  14. Install keras non installed residual dependencies
    conda install pyyaml HDF5 h5py yaml
  15. Install keras
    pip install keras
  16. Test by importing theano, tensorflow, keras directly in python command line
    python
    import theano
    import tensorflow
    import keras

Default Keras backend should be tensorflow (of course Francois Chollet is working at google!). I’ll try the jupyter notebooks later this weekend.


(Jeremy Howard) #33

It’s here: http://files.fast.ai/data/


(Jakub Arnold) #34

Did you turn cudnn on explicitly? I’ve tried following this guide https://github.com/Theano/Theano/issues/5348 which has a few additional steps of adding INCLUDE and LIBRARIES env variables and a few other things in theano config.


(Eyal) #35

Hi jeremy,
Thank you for making this course.
I have both a desktop (win7) and a laptop (Win10) that I want to use for this course (one when I am home, One when I am out with my laptop). Linux and Bash are new to me. I am using windows 10 in my laptop right now and I am working few hours to figure out how to install the Cygwin part, unfortunately without success. Can I ask you some questions to better understand how to solve this?

  1. When I execute “pip install awscli”, where the downloaded / installed files reside ?
  2. setup_p2.sh now sits in gitHub. If I use the wget on the copied file link, it saves an html content, not the content intended. So, maybe I should copy it and save it (I saw that mentioned somewhere in the forum). To where do I save it ?
  3. After I configure the aws using “aws configure” on my laptop and do all the following directions, do I need to execute "“aws configure” also in my desktop ?
    Do I need to run “bash setup_p2.sh” also on my desktop ?
  4. I see some users commenting about installing python into bash, not to windows. What does it mean ? isn’t the python installed in windows the same python used in Bash ?
  5. My laptop has Nvidia Geforce 940mx. Can I use it ? can you reference for directions ?

(Alexandre Cadrin-Chênevert) #36

No I didn’t. I just copied the Cudnn files to the bin/include/lib folders in the CUDA/V8.0 folder as specified. I can run the first week notebook with tensorflow backend after some changes to vgg16.py, utils.py and lesson1 code especially to make it work with Keras 2. But I don’t exactly know if tensorflow is really using Cudnn. According to http://www.nvidia.com/object/gpu-accelerated-applications-tensorflow-installation.html, when importing tensorflow in python, it should output if libcudnn.so is used. But I get no output when importing tensorflow. I didn’t try for now with theano.


(Bob Kot) #37

My apologies in advance in reposting this question of which I seem to be unable to arrive at a straightforward and succinct solution.

In the video section after you submit the command “pip install awscli” in the cygwin terminal I get the following message after I submit “aws configure”:

C:\Python27\python.exe: can’t open file ‘/cygdrive/c/Python27/Scripts/aws’: [Errno 2] No such file or directory

Same message on submitting the “aws” also.

I am running windows 8.1 with python 2.7.9.

Does anyone have a straightforward methodical approach for this section of the install to eliminate these error messages?

Thanks in advance to all.


#38

The latest tutorial for a smooth install on Win 10 is from Phil Ferriere here https://github.com/philferriere/dlwin , haven’t tested yet though.

EDIT: It works! Keras, Theano, cuDNN (and also xgboost), using GPU as expected.


(Vikas) #39

I get a lot of options when I type Python in the search box while selecting packages in Cygwin. Any particular one to install?
BTW - this was after I installed Anaconda and Cygwin and running into issues with the errors that have been discussed here.


#40

Actually, if you try anaconda prompt, you will find that you can use aws well, though I still can not find a easier way to use aws in cygwin


(blogrussell) #41

Use “LONG PATH TOOL” for issues like copying/ renaming and deleting long path files name.


(dima naiman) #42

I’m probably missing something.
But when I start python from Anaconda command line, and type import keras. everything works fine.
But when I do it from Cygwin, python says he can’t find keras.

Am I missing something ? should it work ?