Try a different method to find out if pip is installed
This commit is contained in:
@@ -178,7 +178,11 @@ def setup_python(
|
|||||||
# make sure pip is installed and available on PATH
|
# make sure pip is installed and available on PATH
|
||||||
if not (installation_path / "Scripts" / "pip.exe").exists():
|
if not (installation_path / "Scripts" / "pip.exe").exists():
|
||||||
# perhaps pip is installed, but not available as 'pip.exe'...
|
# perhaps pip is installed, but not available as 'pip.exe'...
|
||||||
if (installation_path / "Scripts" / "pip3.exe").exists():
|
pip_is_installed = (
|
||||||
|
subprocess.run(["python", "-m", "pip", "--version"], env=env, cwd="C:\\cibw").returncode
|
||||||
|
== 0
|
||||||
|
)
|
||||||
|
if pip_is_installed:
|
||||||
# if it's there, remove that version of pip.
|
# if it's there, remove that version of pip.
|
||||||
call(["python", "-m", "pip", "uninstall", "--yes", "pip"], env=env, cwd="C:\\cibw")
|
call(["python", "-m", "pip", "uninstall", "--yes", "pip"], env=env, cwd="C:\\cibw")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user