Set up development environment for deep learning

Deep learning has gained a lot of attention because it is particularly good at some type of learning which is very useful for real-world applications. Running some simple examples is a good way to start learning this technique. Setting up a development environment is the first step.

There are different ways to set up the environment for deep learning. You can do it on Windows, Mac OS, or Linux. I highly suggest developing on Mac OS or Linux, because simply most people in this area use Linux or Mac OS. This posts shows a simple way to do it on Ubuntu.

1. Install Anaconda

Updated guide for installing Anaconda can be found in the official site. The URL is: https://docs.continuum.io/anaconda/install/linux.html

By default, this will be installed under /home/yourname/.

2. Create a Virtual Environment

Python language has many versions such as 2.6, 2.7, and 3.7. Very often, open source projects depend on different language and package versions. It is easy to mess up the development environment. The right way to handle this situation is creating a separate virtual environment for projects depending on the same packages and versions. Everything installed under a virtual environment only affects that environment, but anything else. Essentially, a virtual environment is an independent directory.

Create a virtual environment with name “p3” and specify the Python language version as 3.7.

conda create -n p3 python=3.7 

Activate the newly created virtual environment “p3”.

source activate p3

Install commonly used packages for machine learning.

pip install numpy
pip install pandas
pip install scikit-learn
pip install seaborn

Install packages for deep learning.

pip install tensorflow
pip install keras

You can also deactivate the virtual environment.

source deactivate p3

3. Install PyCharm

Download the Community version here: https://www.jetbrains.com/pycharm/download/#section=linux

Copy it to /opt/ directory.

sudo cp pycharm-community-2017.1.4.tar.gz /opt/

Unzip the file.

cd /opt/
tar -xzvf pycharm-community-2017.1.4.tar.gz

Run the script to start.

. /opt/pycharm-community-2017.1.4/bin/pycharm.sh

Now, you can do deep learning to discover your own interesting stuff.

Leave a Comment