Fix pip upgrade/downgrade on Windows.
diff --git a/pip-wrapper.py b/pip-wrapper.py index 5cb5964..30a56fd 100644 --- a/pip-wrapper.py +++ b/pip-wrapper.py
@@ -12,7 +12,13 @@ def ensure_pip_version(pip_bin, ver): - cmd = [pip_bin, 'install', 'pip ' + ver] + """ + Ensure the pip version meets the specified version. + + Use python -m pip to upgrade/downgrade, because for this operation, + on Windows, pip.exe must not be locked. + """ + cmd = [sys.executable, '-m', 'pip', 'install', 'pip ' + ver] subprocess.check_call(cmd)