Appendix D. Setting up Anaconda with a virtual environment

 

Anaconda is a Python code package that’s especially useful for data science. The default installation will have many tools a data scientist might use. In our book we’ll use the 32-bit version because it often remains more stable with many Python packages (especially the SQL ones).

While we recommend using Anaconda, this is in no way required. In this appendix, we’ll cover installing and setting up Anaconda. Instructions for Linux and Windows installations are included, followed by environment setup instructions. If you know a thing or two about using Python packages, feel free to do it your own way. For instance, you could use virtualenv and pip libraries.

D.1. Linux installation

To install Anaconda on Linux:

1.  Go to https://www.continuum.io/downloads and download the Linux installer for the 32-bit version of Anaconda based on Python 2.7.

2.  When the download is done use the following command to install Anaconda:

bash Anaconda2-2.4.0-Linux-x86_64.sh

3.  We need to get the conda command working in the Linux command prompt. Anaconda will ask you whether it needs to do that, so answer “yes”.

D.2. Windows installation

To install Anaconda on Windows:

1.  Go to https://www.continuum.io/downloads and download the Windows installer for the 32-bit version of Anaconda based on Python 2.7.

2.  Run the installer.

D.3. Setting up the environment