Cannot configure different python paths for the same workspace folder when opened locally and in the container
See original GitHub issueIn my workspace folder, I’d like to be able to have different pythonPath depending on whether it’s open locally or in a container.
In my specific example, for container, it should be /usr/bin/python
, and for local env it’s ${workspaceFolder}/.venv/bin/python
I have set "python.pythonPath": "/usr/bin/python"
in devcontainer.json
, and that works for the container.
However, I cannot do the same for local environment - the only option is user-level setting, not repo-level.
Once I select python interpreter when opened locally, it overrides .vscode/settings.json, and that changes it for the container.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Using Python environments in VS Code
Configuring Python Environments in Visual Studio Code. ... Note: While it's possible to open a virtual environment folder as a workspace, doing so...
Read more >Importing files from different folder - python - Stack Overflow
When importing a file, Python only searches the directory that the entry-point script is running from and sys.path which includes locations such as...
Read more >Configure a Python interpreter | PyCharm Documentation
Press Ctrl+Alt+S to open the IDE settings and select Project <project name> | Python Interpreter. · Expand the list of the available interpreters ......
Read more >Packaging and distributing projects
This section covers some additional details on configuring, packaging and distributing Python projects with setuptools that aren't covered by the ...
Read more >Understanding the Python Path Environment Variable in Python
Python path is an environment variable used to maintain directories of custom Python libraries. Learn how to set a python path variable on ......
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
Thanks, @luabud ! Works great. I hope this feature gets accepted and implemented 😃
The experiment is now available to all users, closing.