Skip to content

Latest commit

 

History

History
83 lines (55 loc) · 3.34 KB

environment-setup.md

File metadata and controls

83 lines (55 loc) · 3.34 KB

OS X requirements

These are only necessary for OS X devs. You will need Xcode, Xcode command line tools, and brew.

For some completely unfathomable reason, OS X does not ship with the GCC compiler installed. And for further unfathomable reasons, it is bundled with XCode, which is over a GB in size and not installed by default. The upshot is, to get brew to work, you need both Xcode and Xcode command line tools installed. Start the Xcode download early, it can take an hour or more depending on your connection!

Next, install brew!

Install the wget tool, which is not installed on OS X by default:

  • brew install wget

Pip and Virtualenv.

Pip is Python's package manager, and virtualenv is a tool that lets you create self-contained environments for sets of python libraries.

Each virtualenv contains its own install of pip, but you need pip to be installed globally in order to install virtualenv and virtualenvwrapper (or, at least, this is the easiest way to get those dependencies).

optionally remove old/crusty versions:

  • sudo apt-get purge python-pip

then get current version (url from http://www.pip-installer.org/en/latest/installing.html)

  • cd /tmp
  • wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py
  • sudo python get-pip.py

optionally verify your install

  • pip --version

install virtualenv and (if you want to stay sane) virtualenvwrapper:

  • sudo pip install virtualenv (harmless if virtualenv is already installed)
  • sudo pip install virtualenvwrapper

add these to your /.bashrc (/.bash_profile if one OS X) (create this file if it doesn't exist):

  • export WORKON_HOME="~/envs" (or whatever you want to name the directory)
  • source /usr/local/bin/virtualenvwrapper.sh (the path should match the path printed by the pip installer for virtualenvwrapper).

don't forget to source the bashrc file now:

  • source ~/.bashrc

dependencies

PIL is a requirement, but in order for it to compile with JPG support, you must have a system-wide library called libjpeg62-dev.

on OS X, download and install the tarball linked to on this stackexchange question. you will need x code installed with the extra "command line tools" component.

to install on linux:

  • sudo apt-get install libjpeg62-dev

you also need the python dev package:

  • sudo apt-get install python-dev

on linux, you may need to symlink these libraries for PIL to find them during the install: sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib/ sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/ sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/

then either install PIL using brew, or from the dmg's available on the PIL website. for example, see the process outlined here

RabbitMQ

celery depends on rabbit-mq, which can be installed using brew on OS X or apt-get on debian/ubuntu (and other ways on other systems).

  • os x: brew update; brew install rabbitmq
  • debian/ubuntu: sudo apt-get install rabbitmq-server

Hooray!

Now you can follow the directions in how-to-run