You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to start testing some select projects against the pending pip 10 release. To do so, in rwt, I've added this commit. Unfortunately, that leads to this failure when running on Windows.
As a seasoned Windows user, I know exactly what's going on here. It's a longstanding weakness in Windows - it's difficult if not impossible to replace a file that's in use. And since pip.exe is in use, pip can't upgrade itself.
Fortunately, there's a workaround.
Instead of invoking pip install, use python -m pip install. As pip doesn't have any binary dependencies (shared libraries), all the modules will be loaded and their files closed immediately, allowing pip to upgrade itself. This technique also works on Unix-based systems so can be applied uniformally.
Is another workaround possible? preferable?
The text was updated successfully, but these errors were encountered:
jaraco
added a commit
to jaraco/pip-run
that referenced
this issue
Apr 10, 2018
I found another workaround in jaraco/rwt (referenced in the commit above) by creating a custom build command that first upgrades pip (using python -m pip), then installs everything else with the new pip.
FWIW python -m pip is recommended by conda-forge on its recipes instead of calling pip directly because it also ensures pip will install the packages in the expected Python environment; if by accident a user has not installed pip in the environment's Python, it will fail with a clear message instead of installing in the wrong location..
I propose we change tox to always use python -m pip install.
I'd like to start testing some select projects against the pending pip 10 release. To do so, in rwt, I've added this commit. Unfortunately, that leads to this failure when running on Windows.
As a seasoned Windows user, I know exactly what's going on here. It's a longstanding weakness in Windows - it's difficult if not impossible to replace a file that's in use. And since pip.exe is in use, pip can't upgrade itself.
Fortunately, there's a workaround.
Instead of invoking
pip install
, usepython -m pip install
. As pip doesn't have any binary dependencies (shared libraries), all the modules will be loaded and their files closed immediately, allowing pip to upgrade itself. This technique also works on Unix-based systems so can be applied uniformally.Is another workaround possible? preferable?
The text was updated successfully, but these errors were encountered: