Re: Setting system path for django
On Saturday, March 26, 2011 8:56:53 AM UTC+11, tim042849 wrote:
I've set up python 2.7 on slax.
I've also set up django 1.1 on slax. Slax does things a little
differently, so it appears. django is installed at
/usr/lib/python2.5/site-packages/django python 2.7 does not know where to find django, because the path to
django is not being added to sys.path.I've created a .pth file that has as it's contents:
##
/usr/lib/python2.5/site-packages/django
##
You should never mix installed packages from different versions of Python. You may get away with it if they are pure code files, but not if there are compiled C extension modules.
Your .pth file didn't work because you referred to the Django directory rather than the parent directory, but if you do the latter you will trigger the problem above of potentially mixing C extension modules from different versions of Python as you may have other stuff installed in that site-packages. End result can be that you will crash Python.
Use a virtualenv against Python 2.7 like others say and reinstall Django into the Python 2.7 virtualenv so you don't risk this mixing of versions and crashing your Python when run.
Graham
--However python is not picking it that path. I have tried the .pth
file in two different locations:
/usr/lib/python2.7 and /usr/lib/python2.7/site-packages On my main workstation, most (but not all) .pth files are in
/usr/lib/python2.6/dist-packages/ but 2.7 does not seem a
'dist-packages' directory at all.Any help would be appreciated.
thanks
--
Tim
tim at johnsons-web dot com or akwebsoft dot com
http://www.akwebsoft.com
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home