Don't use sudo use a virtual environment instead, like this:
$ sudo apt-get install python-virtualenv
$ mkvirtualenv django_env
$ source django_env/bin/activate
(django_env) $ pip install django
(django_env) $ cd $HOME
(django_env) $ mkdir projects
(django_env) $ cd projects
(django_env)/projects $ django-admin.py startproject foo
(django_env)/projects $ cd foo
(django_env)/projects/foo $ python manage.py runserver
When you are finished; type deactivate
to exit the virtual environment:
(django_env)/projects/foo $ deactivate
/projects/foo $
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…