Opened 7 years ago

Closed 7 years ago

#18115 closed Cleanup/optimization (fixed)

Warn that repeated " 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


If you repeatedly install newer versions of Django (or any other Python project) using "python 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 " 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 Changed 7 years ago by anonymous

Please add a note how to detect Django version and path:

>>> import django
>>> django.VERSION
(1, 3, 0, 'final', 0)
>>> django.__file__

So, it will be much more clear to people not familiar with python installation structure to understand what "site-packages" means.

comment:2 Changed 7 years ago by Karen Tracey

We did used to note that you had to get rid of any old install before re-install:

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 that if you've already got Django installed it needs to be removed first before you run again. Possibly a stronger note than used to be there.

comment:3 Changed 7 years ago by Aymeric Augustin

I suggested a possible solution there...

[EDIT] ... and it doesn't work, as explained down the thread.

Last edited 7 years ago by Aymeric Augustin (previous) (diff)

comment:4 Changed 7 years ago by Carl Meyer

Has patch: set

I filed a pull request for both a documentation update and a change to 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:5 Changed 7 years ago by Ramiro Morales

#18203 reported this again.

comment:6 Changed 7 years ago by Jannis Leidel

Triage Stage: UnreviewedReady for checkin

I looked at the pull request and think it's ready to go.

comment:7 Changed 7 years ago by Carl Meyer <carl@…>

Resolution: fixed
Status: newclosed

In [6ed7d40727f70934df6ab0ac96f5f1c4f01c534f]:

Fixed #18115 - added warning about overlaid install. now warns if it detects that Django is being installed over top
of a previous installation that was never removed. This should only
happen when installing with python install, as pip
automatically uninstalls before installing a new version and
easy_install installs as an egg directory.

Also generally updated the installation doc.

Note: See TracTickets for help on using tickets.
Back to Top