Sunday, September 9, 2012

Re: I can't install django on my mac. I'm not sure why. Details inside.

On Sun, 9 Sep 2012 12:41:08 -0700, Shayan Afridi
<palmtreetutoring@gmail.com> declaimed the following in
gmane.comp.python.django.user:

> Here's what I get when I print sys.path. (django's not there)
>
As has been mentioned, the django /directory/ (or a .pth file) is
what needs to be in one of those locations.

> >>> print sys.path
> ['', 'C:\\Windows\\system32\\python27.zip', 'C:\\Python27\\DLLs',
> 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C
> :\\Python27\\lib\\lib-tk', 'C:\\Python27',
> 'C:\\Python27\\lib\\site-packages', 'C:\\Python27\\lib\\site-packages']
>
Interesting that is has TWO occurrences of the site-packages
directory...

E:\UserData\Wulfraed\My Documents>python
ActivePython 2.7.2.5 (ActiveState Software Inc.) based on
Python 2.7.2 (default, Jun 24 2011, 12:21:10) [MSC v.1500 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> import pprint
>>> pprint.pprint(sys.path)
['',
'e:\\Python27\\lib\\site-packages\\pyopengl-3.0.2b2-py2.7.egg',
'e:\\Python27\\lib\\site-packages\\pywinusb-0.3.1-py2.7.egg',
'e:\\Python27\\lib\\site-packages\\sqlobject-1.3.1-py2.7.egg',
'e:\\Python27\\lib\\site-packages\\formencode-1.2.4-py2.7.egg',
'e:\\Python27\\lib\\site-packages\\sqlalchemy-0.7.8-py2.7.egg',
'C:\\WINDOWS\\system32\\python27.zip',
'e:\\Python27\\DLLs',
'e:\\Python27\\lib',
'e:\\Python27\\lib\\plat-win',
'e:\\Python27\\lib\\lib-tk',
'e:\\Python27',
'e:\\Python27\\lib\\site-packages',
'E:\\Dabo and Django Support',
'e:\\Python27\\lib\\site-packages\\django',
'e:\\Python27\\lib\\site-packages\\win32',
'e:\\Python27\\lib\\site-packages\\win32\\lib',
'e:\\Python27\\lib\\site-packages\\Pythonwin',
'e:\\Python27\\lib\\site-packages\\setuptools-0.6c11-py2.7.egg-info',
'e:\\Python27\\lib\\site-packages\\wx-2.8-msw-unicode']
>>>

Django is, on my system, currently installed in site-packages; the
only thing in that "E:\Dabo and Django Support" are the Dabo
directories, and a short cut to "e:\\Python27\\lib\\site-packages" so I
can get to it fast for SVN updates.

AH! It wants just the django subdirectory, not the overall directory
with docs, tests, etc.... I had to create a django.pth with the contents
of just the relative path

django

so Python would look /inside/ that directory to find the django /module/
directory -- that is producing the

'e:\\Python27\\lib\\site-packages\\django',

line in the above. Without it I was also getting a module not found
error.
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.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


Real Estate