multiroot-workspace-wide "pythonPath" setting is not respected through all folders if it's a relative path
See original GitHub issueI have one VSC workspace with multiple folders. There is no settings.json
or .vscode
folder(s), just a single .code-workspace
file with all settings
, launch
and other workspace settings. Here is my folder structure:
- folder1/:
- <package 1>/
- wks/:
- dev.code-workspace
- venv/
- folder2/:
- <package 2>/
- folder3/:
- <package 3>/ …
I want to use venv
from folder1
in all folders/packages added to dev.code-workspace
, so I set workspace-wide python interpretter setting to python in venv
. As it currently works, venv
is detected, selected and activated properly for folder1
, 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 https://github.com/microsoft/vscode-python/issues/3325#issuecomment-753878681_
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
Python - Get relative path of all files and subfolders in a directory
Use os.path.relpath() . This is exactly its intended use. import os root_dir = "myfolder" file_set = set() for dir_, _, files in os.walk(root_dir):...
Read more >Simple trick to work with relative paths in Python | by Mike Huls
The goal of this article is to calculate a path to a file in a folder in your project. The reason we calculate...
Read more >pathlib — Object-oriented filesystem paths — Python 3.11.1 ...
The target path may be absolute or relative. Relative paths are interpreted relative to the current working directory, not the directory of the...
Read more >Get parent of current directory using Python - GeeksforGeeks
The relative path for given path will be computed with respect to the directory indicated by start. The default value of this parameter...
Read more >Working Directories, Absolute and Relative Paths and Other ...
Explain the difference between relative and absolute paths. Check and set your working directory in Python using the os package. What You Need....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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 https://github.com/microsoft/vscode-python/issues/18650, relative paths are no longer needed.