Django & virtualenv

Ned Deily nad at acm.org
Fri Aug 24 12:31:42 PDT 2012


In article <50376297.8090503 at gmail.com>,
 Phil Dobbin <phildobbin at gmail.com> wrote:
> That did the trick. Now running:
> 
> `$ django-admin.py`
> 
> gets the desired result. Don't know if this mentioned anywhere in the
> docs but if it isn't, maybe it should be. Probably at the tail end of
> the install perhaps.

Macports installs many Python scripts into /opt/local/bin but with a 
version suffix.  For the Python 2.7 version of django, you should see:

    django-admin-2.7.py

Also, there is no reason to be manually setting PTYHONPATH to the 
framework site-packages directory.  That is normally always searched 
unless you are in a virtualenv and explicitly created it with 
--no-site-packages.  Setting PYTHONPATH should be a rare event; there 
should almost always be a better way.

-- 
 Ned Deily,
 nad at acm.org



More information about the macports-users mailing list