Setting up our environment for the API tutorial.
- Python 2.x
- virtualenv You can either download directly, or:
- Mac:
$ sudo easy_install virtualenv
- Ubuntu:
$ sudo apt-get virtualenv
- Fedora:
$ sudo yum install python-virtualenv
- Windows: Download manually
- Mac:
- virtualenvwrapper You can either download it directly, or:
- Mac:
$ sudo easy_install virtualenvwrapper
- Ubuntu:
$ sudo apt-get virtualenvwrapper
- Fedora:
$ sudo yum install python-virtualenvwrapper
- For Mac, Ubuntu, and Fedora:
$ export WORKON_HOME=~/Envs
$ mkdir -p $WORKON_HOME
$ source /usr/local/bin/virtualenvwrapper.sh
- Windows: Download manually and follow install instructions
- Mac:
Within your terminal:
- Change into the APIs project:
$ cd new-coder/apis
- Make sure you’ve installed virtualenvwrapper and followed the steps above from Initial Requirements above to set up your terminal correctly. More information can be find at virtualenvwrapper’s docs.
- Make a virtual environment specific to your Data Viz project:
$ mkvirtualenv APIProj
- You should see
(APIProj)
before your prompt. Now install package requirements with the following command for this project.
(APIProj) $ pip install -r requirements.txt
- Your virtual environment will store the required packages in a self-contained area to not mess up with other Python projects.
[Continue on to Part 1: Setup Raw Data →]( {{ get_url("Part-1-Setup-raw-data/")}})
Sadly, you have to install numpy manually before using the requirements.txt.