Notes on installing basic set of machine learning tools into Windows 10. Also followed by Lesson1 install notes and a list of current issues. Tested using Fall Creators Edition.
Warning: Windows issues with Lesson 1 notebook currently under investigation:
- Windows command line: Pickle section of Lesson 1 is throwing a thread error.
- WSL: In training section, pytorch is complaining that an Nvidia driver is missing. I haven’t figured out how to disable GPU access.
Installing to Windows command line:
- Anaconda installer is a different animal than usual installer. I had to turn off my antivirus (Webroot) to get it to install properly. Always reboot after Anaconda install/uninstall/reinstall.
- Download and install Anaconda for Windows at https://www.anaconda.com/download/. I don’t recommend using any existing Anaconda environment installed by Visual Studio 2017. Start with your own dedicated environment.
- When using tools, always use
Anaconda Prompt
, not defaultCommand Prompt
.
FYI, Anaconda Prompt location: C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Anaconda3 (64-bit)
FYI, Anaconda Prompt shortcut: %windir%\System32\cmd.exe “/K” C:\Users\%USERNAME%\Anaconda3\Scripts\activate.bat C:\Users\%USERNAME%\Anaconda3 - Install pytorch for Windows, if needed:
conda install -c peterjc123 pytorch cuda80
# for both Windows and Linux? - Install additional packages, if needed (e.g.
conda install tensorflow-gpu joblib
). - If installing tensorflow-gpu (for systems with NVidia GPUs), you must install EXACTLY these two packages.
a. Install cuda_8.0.61_win10 from https://developer.nvidia.com/cuda-toolkit-archive
b. Install cudnn-8.0-windows10-x64-v6.0 from https://developer.nvidia.com/rdp/cudnn-download
Installing to Windows Subsystem for Linux/WSL/Ubuntu/bash/openSUSE/SUSE Enterprise.
- Follow instructions for installing WSL at Install the Linux Subsystem on Windows 10.
- Install Anaconda using wget and latest version number:
wget https://repo.continuum.io/archive/Anaconda3-5.0.1-Linux-x86_64.sh
bash Anaconda3-5.0.1-Linux-x86_64.sh
- I had to install execstack (apt or rpm) to workaround an https error which was blocking additional conda installs.
sudo apt-get update
sudo apt install execstack
execstack -c ~/anaconda3/lib/libcrypto.so.1.0.0
- Install pytorch, if needed:
conda install pytorch
- Install other packages, if needed (e.g.
conda install tensorflow joblib keras matplotlib seaborn
)
Make sure packages are updated:
conda upgrade conda
conda upgrade --all
conda upgrade jupyter tensorflow-gpu keras matplotlib seaborn
We’ve upgraded the packages that conda knows about but some packages are only known to pip. You might want to update pip packages.
Verify that packages are installed and display version numbers:
python -c "import sys;print (sys.executable)"
python -c "import sys;print (sys.version)"
python -c "import jupyter;print (jupyter.__file__)"
python -c "import torch;print (torch.__file__)"
python -c "import tensorflow;print (tensorflow.__file__, tensorflow.__version__)"
python -c "import keras;print (keras.__file__, keras.__version__)"
python -c "import matplotlib;print (matplotlib.__file__, matplotlib.__version__)"
python -c "import seaborn;print (seaborn.__file__, seaborn.__version__)"
Additional installation for Part 1 v2 Lesson1 Jupyter notebook:
SET PYTHONPATH=<path to fastai directory> # Windows only
export PYTHONPATH=<path to fastai directory> # Linux only
conda install -c anaconda bcolz
pip install isoweek
pip install pandas_summary
pip install tqdm
conda install -c peterjc123 pytorch # for both Windows and Linux?
pip install torchvision
pip install torchtext
pip install graphviz
pip install sklearn-pandas
conda install -c anaconda opencv # Linux only
conda install -c conda-forge opencv # Windows only
execstack -c ~/anaconda3/lib/* # Linux only: I needed this to fix an execute stack error. Not sure why.
After installing, verify that Part 1 v2 Lesson1 requisites actually exist.
python -c "import bcolz;print (bcolz.__file__, bcolz.__version__)"
python -c "import isoweek;print (isoweek.__file__, isoweek.__version__)"
python -c "import pandas_summary;print (pandas_summary.__file__)"
python -c "import tqdm;print (tqdm.__file__, tqdm.__version__)"
python -c "import torch;print (torch.__file__, torch.__version__)"
python -c "import torchvision;print (torchvision.__file__)"
python -c "import torchtext;print (torchtext.__file__)"
python -c "import graphviz;print (graphviz.__file__)"
python -c "import sklearn-pandas;print (sklearn-pandas.__file__)"
python -c "import cv2;print (cv2.__file__, cv2.__version__)"
Screenshot showing all modules working for lesson 1.