Skip to content

Instantly share code, notes, and snippets.

@wall72
Last active May 16, 2017 06:19
Show Gist options
  • Save wall72/4bbe01b9df780c0c20a3e346ae6543e0 to your computer and use it in GitHub Desktop.
Save wall72/4bbe01b9df780c0c20a3e346ae6543e0 to your computer and use it in GitHub Desktop.
install Tensorflow, OpenAI Gym on WSL

install Tensorflow, OpenAI Gym on WSL

1. uninstall lxrun

> lxrun /uninstall /full

2. run bash

3. update

$ sudo apt-get update
$ sudo apt-get upgrade

4. make symbolic link

$ ln -s /mnt/c/home/workspace/python ~/python
$ ln -s /mnt/c/home/notebooks_l64 ~/notebooks

5. install packages

$ sudo apt-get install -y --no-install-recommends \
  build-essential \
  cmake \
  git \
  libav-tools \
  libboost-all-dev \
  libfreetype6-dev \
  libjpeg-dev \
  libpng12-dev \
  libsdl2-dev \
  libzmq3-dev \
  pkg-config \
  python3-dev \
  python3-pip \
  python3-numpy \
  python3-scipy \
  python3-matplotlib \
  python3-opengl \
  python3-pandas \
  python3-tk \
  swig \
  unzip \
  xorg-dev \
  xvfb
$ sudo apt-get install -y --no-install-recommends \
  nvidia-319 \
  nvidia-settings-319 \
  nvidia-prime

6. upgrade pip

$ sudo -H pip3 install --upgrade pip
$ sudo -H pip3 uninstall pyparsing
$ sudo -H pip3 install pyparsing

($ sudo -H pip3 install setuptools)

7. install packages with pip

$ sudo -H pip3 install \
  nose-timer \
  pylint \
  seaborn
$ sudo -H pip3 install --upgrade tensorflow
$ sudo -H pip3 install gym['atari']

8. enable xserv

; edit .bashrc

  export DISPLAY=:0

; install xserv

  https://sourceforge.net/projects/vcxsrv/

9. enable jupyter

; install jupyter, ipykernel

$ sudo -H pip3 install jupyter ipykernel

; add kernel

$ sudo jupyter kernelspec install-self

; reinstall libzmq

$ sudo add-apt-repository ppa:aseering/wsl
$ sudo apt-get update
$ sudo apt-get install libzmq3

; reinstall pyzmq

$ sudo -H pip3 uninstall pyzmq
$ sudo -H pip3 install --no-use-wheel -v pyzmq

; run jupyter

$ jupyter notebook --no-browser

appendix. install mxnet

$ sudo -H pip3 install mxnet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment