Opened 17 years ago

Last modified 16 years ago

#6695 closed

how to install: site-packages not where the document says it is on OS X — at Version 3

Reported by: Michael S. Owned by: nobody
Component: Documentation Version: 0.96
Severity: Keywords:
Cc: mjs@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Jacob)

The how to install documentation at:

http://www.djangoproject.com/documentation/install/

says that if django is installed via "setup.py install" django will be installed as a django subdirectory of the site-packages directory. It further suggests that to find the site-packages directory, one should run the following command:

python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"

However, this seems to produce the wrong output on OS X 10.5: the output it gives is:

$ python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
/Library/Python/2.5/site-packages

but the actual directory django was installed in is:

/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages

(and this isn't a symlink to the other.)

Change History (3)

comment:1 by Graham Dumpleton, 17 years ago

If Django was installed in:

/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages

then your Python installation has been broken in some way, or whatever tool you used to install Django is calculating the location of the site-packages directory incorrectly.

The correct location for Python 2.5.1 that comes standard which MacOS X (10.5/Leopard) is:

/Library/Python/2.5/site-packages

For the MacOS X supplied version of Python 2.5.1, the site-packages directory under the framework directory shouldn't be used and should never be created. The Python program shouldn't ever look there.

I am still not sure how peoples installations are getting screwed up, but one reason may be where people had installed version of MacPorts 2.5.1 on MacOS X 10.4 and then done an upgrade to MacOS 10.5. Alternatively, some version of setuptools is broken and not doing things correctly.

comment:2 by Michael Stillwell <mjs@…>, 17 years ago

I have 10.5, and on my system /usr/bin/python is a symlink to /System/Library/Frameworks/Python.framework/Versions/2.5/bin/python, so the Python.framework stuff does seem to be involved somehow.

I didn't upgrade a MacPorts python from 10.4 to 10.5, but I didn't have an (incomplete) version of MacPorts' python25 installed at one point, though all traces of it should be removed now. (I initially tried to install django via MacPorts but that didn't work.)

comment:3 by Jacob, 17 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top