Pip fails to clean up build/ files after egg_info exception, preventing re|un-installation #602
Labels
auto-locked
Outdated issues that have been locked by automation
type: bug
A confirmed bug or unintended behavior
If you try to install a package whose
setup.py egg_info
causes aSyntaxError
, pip doesn't catch that exception, and terminates without cleaning up the partial installation inbuild/
. This will then prevent any subsequent installation of that package, because pip will always detect that partial installation, try to runegg_info
on it, and terminate again with aSyntaxError
.Pip should probably catch the errors in both of those cases. In the first step, it should probably remove the failed installation from
build/
and exit with a nicer error message. In the second step, if bad files somehow still exist inbuild/
, it should probably catch exceptions inegg_info
and proceed as though no existing files were inbuild/
; or perhaps ask the user whether it should remove the files or cancel the command altogether.This can be reproduced by installing a non-python-2.4-compatible package in a py2.4 environment, and then trying to install an earlier py2.4-compatible version of the same package. For example:
You can't uninstall it because it never finished getting installed:
So you have to (know how to) remove the partial installation yourself to proceed:
The text was updated successfully, but these errors were encountered: