-
Notifications
You must be signed in to change notification settings - Fork 1.2k
multiroot-workspace-wide "pythonPath" setting is not respected through all folders if it's a relative path #15610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm experiencing the same situation. My workaround was to explicitly configure {
"python.pythonPath": "../venv/bin/python",
} |
Hi @schperplata, thank you for making a separate issue for your problem! I cannot replicate the issue you're having: I specified the absolute path to my virtual environment in the
{
"folders": [
{
"path": "./folder1"
},
{
"path": "./folder2"
},
{
"path": "./folder3"
},
{
"path": "folder1/folder4"
}
],
"settings": {
"python.formatting.provider": "black",
"editor.formatOnSave": true,
"python.terminal.activateEnvInCurrentTerminal": true,
"python.pythonPath": "~/Documents/Sandbox/multiroot/folder1/.venvone/bin/python"
}
} and my folder structure: Could you post the content of the Python channel from the Output panel here? |
@kimadeline I (we) do not work with absolute paths. Workspace is a part of a versioned folder structure and therefore path must be relative. |
Thank you for the clarification! We do have a lot of room for improvement for multiroot workspace support. I marked this issue as preexisting since it's not anything new that was introduced in a recent release. |
Closing in favor of #18650, relative paths are no longer needed. |
I have one VSC workspace with multiple folders. There is no
settings.json
or.vscode
folder(s), just a single.code-workspace
file with allsettings
,launch
and other workspace settings. Here is my folder structure:...
I want to use
venv
fromfolder1
in all folders/packages added todev.code-workspace
, so I set workspace-wide python interpretter setting to python invenv
. As it currently works,venv
is detected, selected and activated properly forfolder1
, but not for others. Others report missing python interpretter path setting and therefore also doesn't work.Am I doing something wrong or is this a bug?
Originally posted by @schperplata in #3325 (comment)
The text was updated successfully, but these errors were encountered: