Skip to content

Commit 75259a9

Browse files
committed
fix: downgrade pip on Windows to 21.3.1
pypa/pip#10875 (comment)
1 parent c86ba68 commit 75259a9

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

dist/setup_cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/setup_cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils/setup/setupPipPack.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,18 @@ export async function setupPipPack(name: string, version?: string): Promise<Inst
3434
return setupPipPack(name, version)
3535
}
3636
}
37+
if (process.platform === "win32") {
38+
// https://github.com/pypa/pip/issues/10875#issuecomment-1030293005
39+
execa.sync(python, ["-m", "pip", "install", "-U", "pip==21.3.1"])
40+
}
3741

38-
execa.sync(python, ["-m", "pip", "install", version !== undefined && version !== "" ? `${name}==${version}` : name], {
39-
stdio: "inherit",
40-
})
42+
execa.sync(
43+
python,
44+
["-m", "pip", "install", version !== undefined && version !== "" ? `${name}==${version}` : name, "--user"],
45+
{
46+
stdio: "inherit",
47+
}
48+
)
4149

4250
if (binDir === undefined) {
4351
if (process.platform === "linux") {

0 commit comments

Comments
 (0)