pypa/pip — pull request #1263 by kanzure (2013-10-27 21:54:07+00:00)
Title: Close a file to prevent a WindowsError

WindowsError: [Error 32] The process cannot access the file because it
is being used by another process: 'C:\\docume~1\\...'

https://mail.python.org/pipermail/distutils-sig/2013-August/022528.html

Btw, a context manager to handle this opened file is probably a good idea. In the interim, this fixes the problem that I am stumbling into.