We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 23be12b commit 239ce44Copy full SHA for 239ce44
1 file changed
src/managers/builtin/venvManager.ts
@@ -191,8 +191,9 @@ export class VenvManager implements EnvironmentManager {
191
try {
192
const stat = await fs.stat(envPath.fsPath);
193
if (!stat.isDirectory()) {
194
- // If the env path is a file (likely the python binary), use its parent directory
195
- envPath = Uri.file(path.dirname(envPath.fsPath));
+ // If the env path is a file (likely the python binary), use parent-parent as the env path
+ // following format of .venv/bin/python or .venv\Scripts\python.exe
196
+ envPath = Uri.file(path.dirname(path.dirname(envPath.fsPath)));
197
}
198
} catch (err) {
199
// If stat fails, fallback to original envPath
0 commit comments