Opened 14 years ago
Closed 13 years ago
#16287 closed Cleanup/optimization (fixed)
Clarify installation documents relating to location of site-packages
Reported by: | Daniele Procida | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.3 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
https://docs.djangoproject.com/en/1.3/topics/install/ assumes that Django will be installed into a site-packages directory, but this isn't a reliable assumption.
Notably, Debian, Ubuntu etc will put it into a dist-packages directory, and the tip to use:
python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
won't help.
I think that this would be worth noting briefly to help avoid confusion. If that seems appropriate, let me know and I will submit a documentation patch.
Attachments (1)
Change History (8)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
On my ubuntu-10.10-server-amd64 python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" returns:
/usr/lib/python2.6/dist-packages
whereas Django 1.2.4 installed from the tarball using python setup.py install actually went into:
/usr/local/lib/python2.6/dist-packages
In other words, not the same dist-packages.
Meanwhile site-packages:
/usr/local/lib/python2.6/site-packages
is completely empty.
It certainly confused me...
I was thinking that the docs should note that it "might" go somewhere else other than site-packages, and not necessarily the place reported by the tip either, in which case to look in any other site-packages/dist-packages directories.
comment:3 by , 14 years ago
Needs documentation: | set |
---|---|
Summary: | Clarify installation documents re site-packages → Clarify installation documents relating to location of site-packages |
Triage Stage: | Unreviewed → Accepted |
Aha! debian/ubuntu have altered distutils to manage where packages will get deployed.
Related discussion: http://mail.python.org/pipermail/distutils-sig/2011-March/017401.html
Either the snippet should be altered to something that also works on debian/ubuntu or the docs should be updated to mention this behaviour.
by , 14 years ago
Attachment: | django-16287.diff added |
---|
comment:4 by , 14 years ago
Has patch: | set |
---|---|
Needs documentation: | unset |
Debian's distutils do not easily surrender their local install path, so I added a paragraph to the docs about the location of site-packages.
comment:5 by , 14 years ago
Type: | Uncategorized → Cleanup/optimization |
---|
comment:6 by , 13 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
The tip actually does work:
Debian squeeze:
There might be very minimal confusion the name is not
site-packages
however.What would your suggestion have been?