Originally Published 12 May 2017
This page gives quick and easy steps to setup your machine for machine learning and deep learning.
Hi guys, In python there are many prebuilt libraries which can be used for machine learning and deep learning. But one major problem lies in setting up the environment for development using these libraries (especially for Windows based machines).
Since most of these libraries were built to be used on Linux (Ubuntu etc), its easier to setup the working environment in Linux. At the same time its a very confusing and lengthy procedure on Windows machine.
So below are the steps to get you up and running for ml and deep learning development on Windows:
For your version of system 32bit or 64bit from here Its better to select the version for Python 3.6 or 3.5.x since Tensorflow is yet only available for Python 3.5.
Fig 1. Anaconda Navigator download page
Follow through the on-screen instructions Next->Next->Next-> then :
Fig 2. Installation step for Anaconda 3
The following packages will be preinstalled in the Navigator:
Fig 3. Initial view of the Anaconda Navigator Panel
on the left side of the Navigator
Fig 4. Environment selection and creation page
Once your new environment for Python 3.5 has been created it would appear like this
Fig 5. Installed packages in a given environment
Now from the search packages box, type-in and download the following packages:
Once all above packages are installed, open up a terminal from your newly created Environment.
Fig 6. Steps to open a terminal in given environment
Once the terminal opens up type in the following for installing Theano:
conda install theano pygpu
Let the download and installation finish. After this type in the following for installing Tensorflow:
For CPU
pip install --ignore-installed --upgrade [https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.1.0-cp35-cp35m-win_amd64.whl](https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.1.0-cp35-cp35m-win_amd64.whl)
For GPU
pip install --ignore-installed --upgrade [https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-1.1.0-cp35-cp35m-win_amd64.whl](https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-1.1.0-cp35-cp35m-win_amd64.whl)
Once tensorflow has been successfully installed, type the following for installing Keras:
pip install git+git://github.com/fchollet/keras.git
Once everything has been installed,go to next Step. If not search for your specific error on Google, you will find numerous discussions and answers on StackOverflow. Otherwise ping me.
Now to test whether scikit-learn, Theano , Tensorflow and Keras are working properly; open up a terminal just like the previous step but with python
Fig 7. Opening a python shell in a given environment
Once the terminal opens up, it should appear like this.
Fig 8. Python Shell showing the installed version 3.5.3
Now type the following commands to test their working
import tensorflow as tf import theano import keras
If there are no errors, then Congratulations you have successfully setup your Environment for machine learning and deep learning.
If some errors pops up, copy the error content as search for solution on Google and stack overflow. This will only help you later in fixing other such minor issue.
Otherwise ping me :D
Originally published at mandroid6.github.io on May 12, 2017.