diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2019-01-26 17:05:25 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2019-01-26 17:05:25 -0500 |
commit | ff950773759423085f506ced0cc8f0f77afff5d1 (patch) | |
tree | ef65f322cd8c8bcce20b52619ffe9fc086727b71 | |
parent | 6671b3f5be254f32732e38e24e6cc8c3618029bd (diff) | |
download | python-setuptools-git-bugfix/downgrade-pip.tar.gz |
Fix pip upgrade/downgrade on Windows.bugfix/downgrade-pip
-rw-r--r-- | pip-wrapper.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pip-wrapper.py b/pip-wrapper.py index 5cb59640..30a56fd5 100644 --- a/pip-wrapper.py +++ b/pip-wrapper.py @@ -12,7 +12,13 @@ import subprocess 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) |