Skip to content

Commit 53f5327

Browse files
committed
Fix embedded python installation _pth file
1 parent bc119a8 commit 53f5327

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/utils/download.mts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1363,7 +1363,9 @@ export async function downloadEmbedPython(
13631363
await workspace.fs.createDirectory(Uri.file(dllDir));
13641364

13651365
// Write to *._pth to allow use of installed packages
1366-
const pthFile = `${targetDirectory}/python312._pth`;
1366+
const versionAppend =
1367+
CURRENT_PYTHON_VERSION.split(".").slice(0, 2).join("");
1368+
const pthFile = `${targetDirectory}/python${versionAppend}._pth`;
13671369
let pthContents = (
13681370
await workspace.fs.readFile(Uri.file(pthFile))
13691371
).toString();

0 commit comments

Comments
 (0)