Saving this so I can find it later & potentially help others. This sets up the latest as of 10/7/2017
- Python
- Keras
- Tensorflow
- PyTorch
Assumes Anaconda3 is installed. Here is mine:
> conda -V
conda 4.3.21
> python -V
Python 3.6.1 :: Anaconda 4.4.0 (64-bit)
Note that on upgrade to the new conda, I had to clean out old kernels & environments. I hit it with a hammer like so:
rm -rf ~/.ipython ~/.jupyter ~/.conda ~/.local/share/jupyter
Create an environment with the packages we'll want. To do this we'll put our dependencies into a file that is basically the root environment modified to have the new packages for deep learning
NOTE: next time I'll use conda create --name dl --clone root
> conda env export -n root > root_environment.yml
> cp root_environment.yml dl_environment.yml
# edit dl_environement to change the name & add the modules we care about. See attached.
# adding pytorch torchvision cuda80 from soumith
# adding keras & tensorflow-gpu
# also remove anaconda & conda packages.
> conda env create -f dl_environment.yml
Activate
> source activate dl
Did not need to give jupyter notebook the ability to run this environment...just Python3 kernel was enough.
Here is a handy snippet to validate versions.
# scipy
import scipy
print('scipy: %s' % scipy.__version__)
# numpy
import numpy
print('numpy: %s' % numpy.__version__)
# matplotlib
import matplotlib
print('matplotlib: %s' % matplotlib.__version__)
# pandas
import pandas
print('pandas: %s' % pandas.__version__)
# statsmodels
import statsmodels
print('statsmodels: %s' % statsmodels.__version__)
# scikit-learn
import sklearn
print('sklearn: %s' % sklearn.__version__)
# keras
import keras
print('keras: %s' % keras.__version__)
# tensorflow
import tensorflow
print('tensorflow: %s' % tensorflow.__version__)
# bcolz
import bcolz
print('bcolz: %s' % bcolz.__version__)
# gensim
import gensim
print('gensim: %s' % gensim.__version__)
# nltk
import nltk
print('nltk: %s' % nltk.__version__)
# h5py
import h5py
print('h5py: %s' % h5py.__version__)
# torch
import torch
print('torch: %s' % torch.__version__)
outputs this for me:
scipy: 0.19.0
numpy: 1.12.1
matplotlib: 2.0.2
pandas: 0.20.1
statsmodels: 0.8.0
sklearn: 0.18.1
Using TensorFlow backend.
keras: 2.0.8
tensorflow: 1.3.0
bcolz: 1.0.0
gensim: 2.3.0
nltk: 3.2.3
h5py: 2.7.0
torch: 0.1.12_1