Skip to content

Instantly share code, notes, and snippets.

@econchick
Created March 5, 2013 04:13
Show Gist options
  • Save econchick/35e071ac590028576fb1 to your computer and use it in GitHub Desktop.
Save econchick/35e071ac590028576fb1 to your computer and use it in GitHub Desktop.

Setting up our environment for the API tutorial.

Initial Requirements:

  • 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
  • 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

Setup

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/")}})

@zerok
Copy link

zerok commented Mar 5, 2013

Sadly, you have to install numpy manually before using the requirements.txt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment