Skip to content

Instantly share code, notes, and snippets.

@sourcec0de
Created February 12, 2014 04:07
Show Gist options
  • Save sourcec0de/8949918 to your computer and use it in GitHub Desktop.
Save sourcec0de/8949918 to your computer and use it in GitHub Desktop.
Setup Django and virtualenv on OSX 10.8
# Install python virtualenv
# this helps with managing python dependencies
# on a per env / application basis much easier
sudo pip install virtualenv
# Create a project folder to store you envs / projects
mkdir python_projects
cd python_projects/
# start a new ENV
virtualenv python_test_env --no-site-packages
# Activate that ENV
source python_test_env/bin/activate
# Install pil a django dependency
pip install pil --allow-external pil --allow-unverified pil
# Install Django
pip install django
# Start a new django project using cli tool
django-admin.py startproject test_app
# enter app root
cd test_app
# Start the server
python manage.py runserver
# Visit http://127.0.0.1:8000/
@sourcec0de
Copy link
Author

Also, note that some of this may not work if you are running 10.9 Mavericks. However it works on a barebones setup with pip, xcode and homebrew 10.8.

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