Created
February 12, 2014 04:07
-
-
Save sourcec0de/8949918 to your computer and use it in GitHub Desktop.
Setup Django and virtualenv on OSX 10.8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.