Skip to content

Commit 1853202

Browse files
committed
fix: ensure that pip is installed on linux
1 parent 40212d6 commit 1853202

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { isBinUptoDate } from "./version"
99
import { join } from "path"
1010
import { getVersion } from "../../default_versions"
1111
import { InstallationInfo } from "./setupBin"
12+
import { setupAptPack } from "./setupAptPack"
1213

1314
let python: string | undefined
1415
let binDir: string | undefined
@@ -39,6 +40,9 @@ export async function setupPipPack(name: string, version?: string): Promise<Inst
3940
// downgrade pip on Windows
4041
// https://github.com/pypa/pip/issues/10875#issuecomment-1030293005
4142
execa.sync(python, ["-m", "pip", "install", "-U", "pip==21.3.1"], { stdio: "inherit" })
43+
} else if (process.platform === "linux") {
44+
// ensure that pip is installed on Linux (happens when python is found but pip not installed)
45+
await setupAptPack("python3-pip")
4246
}
4347
}
4448

0 commit comments

Comments
 (0)