forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
area-environmentsFeatures relating to handling interpreter environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugmacosneeds spikeLabel for issues that need investigation before they can be worked on.Label for issues that need investigation before they can be worked on.
Description
Environment data
- VS Code version: 1.48.0
- Extension version: v2020.8.103604
- OS and version: macOS 10.14.6
- Python version: 3.8.1
- Type of virtual environment used: venv
- Value of the
python.languageServer
setting: Pylance
Steps to reproduce
Python: Select Interpreter
->Enter interpreter path...
->Find...
- Browse to a venv bin directory, e.g.
Documents/my-venv/bin
- Select the
python
file (it's actually a symlink, because it's a venv) - Click
Select Interpreter
Expected behaviour
The selected venv should show up in the interpreter status bar.
Actual behaviour
The system interpreter is selected instead. That is because the file chooser dialog follows the venv's python
symlink and returns the path to the system python (or more accurately, to the Python used to create the venv).
Discussion
Electron has a noResolveAliases
option for showOpenDialog
, but seems like this isn't available in VS Code. One workaround is typing the path manually instead of browsing. This may be clarified to the user somehow.
Metadata
Metadata
Assignees
Labels
area-environmentsFeatures relating to handling interpreter environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugmacosneeds spikeLabel for issues that need investigation before they can be worked on.Label for issues that need investigation before they can be worked on.