Opened 13 years ago
Closed 12 years ago
#18115 closed Cleanup/optimization (fixed)
Warn that repeated "setup.py install" without removal causes problems
Reported by: | Carl Meyer | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.4 |
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
If you repeatedly install newer versions of Django (or any other Python project) using "python setup.py install", without removing the previously-installed version, any files removed in the newer version will never be removed from your site-packages. This can potentially cause a variety of problems, including imports continuing to "work" (with outdated code) that ought to fail, and most visibly in Django 1.4, extraneous files in the startproject template.
The installation instructions ought to include a clear warning against this. Currently there's a bit of a warning at the end of this section, but it's not as clear as it could be about the specific risk of repeated "setup.py install", and it's in the section about installing using a pth file or symbolic link, which is a different thing entirely.
Change History (7)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
We did used to note that you had to get rid of any old install before re-install: https://docs.djangoproject.com/en/1.0/topics/install/#remove-any-old-versions-of-django
Not that everyone read/did that (possibly because the instructions were not exactly specific, since there wasn't any official way to "uninstall"?), leading to tickets like #9090 and #9112.
But we should definitely put a note back around instructions to use setup.py that if you've already got Django installed it needs to be removed first before you run setup.py again. Possibly a stronger note than used to be there.
comment:3 by , 13 years ago
I suggested a possible solution there...
[EDIT] ... and it doesn't work, as explained down the thread.
comment:4 by , 13 years ago
Has patch: | set |
---|
I filed a pull request for both a documentation update and a change to setup.py that will warn users who are installing on top of an existing install. More details in the pull request summary. Comments welcome here or on the pull request. If there are no comments I'll merge it in a few days.
comment:6 by , 12 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
I looked at the pull request and think it's ready to go.
comment:7 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Please add a note how to detect Django version and path:
So, it will be much more clear to people not familiar with python installation structure to understand what "site-packages" means.