diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index 2a3b1881..0426441c 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -236,7 +236,15 @@ def setup_python( # ensure we have the version that matches our constraints # use "--force-reinstall" ensures that it's installed as 'pip' call( - ["python", "-m", "pip", "install", "--force-reinstall", "pip", *dependency_constraint_flags], + [ + "python", + "-m", + "pip", + "install", + "--force-reinstall", + "pip", + *dependency_constraint_flags, + ], env=env, cwd="/tmp", ) diff --git a/cibuildwheel/windows.py b/cibuildwheel/windows.py index addd3bc0..42dfc85d 100644 --- a/cibuildwheel/windows.py +++ b/cibuildwheel/windows.py @@ -180,7 +180,15 @@ def setup_python( # ensure we have the version that matches our constraints # use "--force-reinstall" ensures that it's installed as 'pip.exe' call( - ["python", "-m", "pip", "install", "--force-reinstall", "pip", *dependency_constraint_flags], + [ + "python", + "-m", + "pip", + "install", + "--force-reinstall", + "pip", + *dependency_constraint_flags, + ], env=env, )