diff options
-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) |