forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Closed
Copy link
Labels
area-environmentsFeatures relating to handling interpreter environmentsFeatures relating to handling interpreter environmentscommunity askFeature request that the community expressed interest inFeature request that the community expressed interest infeature-requestRequest for new features or functionalityRequest for new features or functionalityverification-neededVerification of issue is requestedVerification of issue is requestedverifiedVerification succeededVerification succeeded
Milestone
Description
It's currently not possible to use multiroot-workspace variable scoping to configure python.defaultInterpreterPath
, as @kimadeline mentioned in #18207 (comment).
My use case is the following. I have multiple python projects in my workspace but I want them all to use the same virtualenv, existing under one of the workspace folders. The tree structure looks like this:
/
├── python-a/
│ ├── .venv/
│ └── foo.py
├── python-b/
│ └── bar.py
To make it work with python.defaultInterpreterPath
I need to configure it like this in the workspace file:
"python.defaultInterpreterPath": "${workspaceFolder}/../python-a/.venv/bin/python"
This is fragile, as it will break if python-b/
workspace folder changes its absolute path. With multiroot-workspace variable scoping it would be possible to express this dependency more robustly like this:
"python.defaultInterpreterPath": "${workspaceFolder:python-a}/.venv/bin/python"
munro, OmeGak, Samuel-Therrien-Beslogic, milkfrog, andrew-parker-novisto and 5 more
Metadata
Metadata
Assignees
Labels
area-environmentsFeatures relating to handling interpreter environmentsFeatures relating to handling interpreter environmentscommunity askFeature request that the community expressed interest inFeature request that the community expressed interest infeature-requestRequest for new features or functionalityRequest for new features or functionalityverification-neededVerification of issue is requestedVerification of issue is requestedverifiedVerification succeededVerification succeeded