On Jan 8, 2012, at 8:22 PM, larry.mart...@gmail.com wrote: > On Jan 7, 7:13 pm, "larry.mart...@gmail.com" <larry.mart...@gmail.com> > wrote: >> On Jan 7, 7:03 pm, David Markey <ad...@dmarkey.com> wrote: >> >>> Is there a reason you didnt do easy_install django? >> >> Cause I didn't know about it. I just followed the directions I found >> at: >> >> https://docs.djangoproject.com/en/dev/topics/install/ >> >> Is there some reason that wouldn't work? > > I solved this by creating a symlink from /Library/Python/2.5/site- > packages/django to my django install dir. Still not sure why that > worked and putting the path in django.pth did not.
Python paths work by appending the search name to the end of everything in sys.path. For example, when you do `import django`, it looks for './django.py', './django/__init__.py', '/usr/local/django-trunk/django.py', '/usr/local/django-trunk/django/__init__.py', etc. None of those paths match. >>> On 8 January 2012 01:50, larry.mart...@gmail.com >>> <larry.mart...@gmail.com>wrote: >> >>>> I am trying to get django working on my mac. I downloaded it from SVN >>>> to /usr/local/django-trunk and it's there: >> >>>> $ ls /usr/local/django-trunk/ >>>> __init__.py core http templatetags bin >>>> db middleware test >>>> conf dispatch shortcuts utils >>>> contrib forms >>>> template views >> >>>> I updated my site-packages with a django.pth file: >> >>>> $ cat /Library/Python/2.5/site-packages/django.pth >>>> /usr/local/django-trunk >> >>>> python does have this dir in its path: >> >>>> $ python -c "import sys; print sys.path" >>>> ['', '/Library/Python/2.5/site-packages/cx_Oracle-5.0.2-py2.5- >>>> macosx-10.5-i386.egg', '/System/Library/Frameworks/Python.framework/ >>>> Versions/2.5/lib/python25.zip', '/System/Library/Frameworks/ >>>> Python.framework/Versions/2.5/lib/python2.5', '/System/Library/ >>>> Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-darwin', '/ >>>> System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ >>>> plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.5/ >>>> lib/python2.5/plat-mac/lib-scriptpackages', '/System/Library/ >>>> Frameworks/Python.framework/Versions/2.5/Extras/lib/python', '/System/ >>>> Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib- >>>> tk', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ >>>> python2.5/lib-dynload', '/Library/Python/2.5/site-packages', '/usr/ >>>> local/django-trunk', '/System/Library/Frameworks/Python.framework/ >>>> Versions/2.5/Extras/lib/python/PyObjC'] >> >>>> But I still can't import it: >> >>>> $ python >>>> Python 2.5.1 (r251:54863, May 5 2011, 18:37:34) >>>> [GCC 4.0.1 (Apple Inc. build 5465)] on darwin >>>> Type "help", "copyright", "credits" or "license" for more information. >>>>>>> import django >>>> Traceback (most recent call last): >>>> File "<stdin>", line 1, in <module> >>>> ImportError: No module named django >> >>>> What am I missing or doing wrong? >> >>>> TIA! >>>> -larry >> >>>> -- >>>> 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+unsubscr...@googlegroups.com. >>>> For more options, visit this group at >>>> http://groups.google.com/group/django-users?hl=en. > > -- > 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+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > Peter of the Norse rahmc...@radio1190.org -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.