views:

153

answers:

1

Hi, I'm a student and the lab staff has set up permissions that won't students install software on the machines (or to our profiles).

I'm curious how I can develop Django application in a contained environment. I checked out the Django trunk to my Ubuntu home directory and added the bin path to my .bashrc. But when I try to use django-admin.py, an error occurs:

ImportError: No module named django.core

I'm quite confident this is simply a path issue. My real question is whether there's a proper to do self-contained development or if I need to manually add paths, and which if so.

In advance, thanks.

+2  A: 

You can manually set the path:

import sys
sys.path.append('/home/kevin/dir_with_module')

You may also want to look into setting up a virtual environment. This article has good information: http://clemesha.org/blog/2009/jul/05/modern-python-hacker-tools-virtualenv-fabric-pip/

Eric Palakovich Carr
Sure, I could do the same in my bash profile, but it feels so hackish.
Kevin
Ah! Now that you've added that link, my question appears answered. Thanks.
Kevin