Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
global pip install doesn't clean up temporary directories #939
"pip install" creates a working directory in /tmp ("/tmp/pip-build-$USERNAME"). This directory is not removed when the installation is done, and still contains the extracted archive for the package you installed without version information. That is, after 'pip install foo==1.0' the directory /tmp/pip-build-$USER still exists, and contains a subdirectory 'foo'.
When the user doesn't clean up the directory manually pip refuses to install updates (pip install foo==2.0), for example with "pip install lxml==3.2.1":
This is rather annoying, as even when pip claims to have finished I still have to verify that it actually installed the package I requested instead of some older version that happens to be the last version I tried to install earlier.
there's recent commits (#865) in the develop branch for proper build cleanup when operating in a virtualenv.
the "pip-build-username" pattern is for global pip installs, and I just checked and it's still not being cleaned up properly.
adding to 1.4 milestone. I'll look at this
pip has a legacy of using fixed build dirs, as best I can tell, due to the "workflow" of the --no-install/--no-download options. my intention is to refactor much of this in #906 in v1.5.
1.5 milestone: https://github.com/pypa/pip/issues?milestone=2&state=open
but for v1.4, the quick fix is that /tmp/pip-build-$USERNAME" needs pip's delete marker dropped into it, when it's created, and pip will clean it up. will merge that fix soon.