Repository navigation
Python interpreter or virtual environments not being listed when opening a specific folder #18437
Copy link
Copy link
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 buginvestigatingWe are looking into the cause of the issueWe are looking into the cause of the issue
Description
Issue Type: Bug
Behaviour
Expected vs. Actual
Expected: Python installation should be detected and a list of the Python interpreter and any virtual environment shouldbe displayed.
Actual: When opening a specific folder, the Python installation is not detected. A pop up stating that Python is not installed comes up. No available Python interpreters or virtual environments are shown.
Steps to reproduce:
- Open folder: C:\Users\user_name\Desktop\University\4. Spring 2022[CS-1205] Algorithm Design and Analysis (Professor Name)\code
- Open a .py file
Diagnostic data
- Python version (& distribution if applicable, e.g. Anaconda): 3.9.7
- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): PipEnv
- Value of the
python.languageServersetting: Default
User Settings
defaultLS: {"defaultLSType":"Pylance"}
downloadLanguageServer: true
envFile: "<placeholder>"
venvPath: "<placeholder>"
venvFolders: "<placeholder>"
condaPath: "<placeholder>"
pipenvPath: "<placeholder>"
poetryPath: "<placeholder>"
languageServer: "Pylance"
linting
• enabled: true
• cwd: "<placeholder>"
• Flake8Args: "<placeholder>"
• flake8Enabled: false
• flake8Path: "<placeholder>"
• lintOnSave: true
• banditArgs: "<placeholder>"
• banditEnabled: false
• banditPath: "<placeholder>"
• mypyArgs: "<placeholder>"
• mypyEnabled: false
• mypyPath: "<placeholder>"
• pycodestyleArgs: "<placeholder>"
• pycodestyleEnabled: false
• pycodestylePath: "<placeholder>"
• prospectorArgs: "<placeholder>"
• prospectorEnabled: false
• prospectorPath: "<placeholder>"
• pydocstyleArgs: "<placeholder>"
• pydocstyleEnabled: false
• pydocstylePath: "<placeholder>"
• pylamaArgs: "<placeholder>"
• pylamaEnabled: false
• pylamaPath: "<placeholder>"
• pylintArgs: "<placeholder>"
• pylintPath: "<placeholder>"
sortImports
• args: "<placeholder>"
• path: "<placeholder>"
formatting
• autopep8Args: "<placeholder>"
• autopep8Path: "<placeholder>"
• provider: "autopep8"
• blackArgs: "<placeholder>"
• blackPath: "<placeholder>"
• yapfArgs: "<placeholder>"
• yapfPath: "<placeholder>"
testing
• cwd: "<placeholder>"
• debugPort: 8000
• nosetestArgs: "<placeholder>"
• nosetestsEnabled: undefined
• nosetestPath: "<placeholder>"
• promptToConfigure: true
• pytestArgs: "<placeholder>"
• pytestEnabled: false
• pytestPath: "<placeholder>"
• unittestArgs: "<placeholder>"
• unittestEnabled: false
• autoTestDiscoverOnSaveEnabled: true
terminal
• activateEnvironment: true
• executeInFileDir: "<placeholder>"
• launchArgs: "<placeholder>"
experiments
• enabled: true
• optInto: []
• optOutFrom: []
insidersChannel: "off"
tensorBoard
• logDirectory: "<placeholder>"
Extension version: 2022.0.1786462952
VS Code version: Code 1.64.0 (5554b12acf27056905806867f251c859323ff7e9, 2022-02-03T04:22:20.678Z)
OS version: Windows_NT x64 10.0.22000
Restricted Mode: No
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz (8 x 1800) |
| GPU Status | 2d_canvas: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: enabled opengl: enabled_on rasterization: enabled skia_renderer: enabled_on video_decode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled |
| Load (avg) | undefined |
| Memory (System) | 7.86GB (1.12GB free) |
| Process Argv | --crash-reporter-id 6c73aa67-01c6-431e-8394-db5f8769137e |
| Screen Reader | no |
| VM | 0% |
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
pythonvspyl392cf:30425750
pythontb:30283811
pythonvspyt551cf:30345471
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dst:30433059
pythonvs932:30410667
vs360:30404995
vsrem710:30416614
Reactions are currently unavailable
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 buginvestigatingWe are looking into the cause of the issueWe are looking into the cause of the issue
Activity
tashi21 commentedon Feb 4, 2022
Moving the folder to another folder (in this case the Desktop) worked. No errors were being shown. Is the problem in the way my earlier folder is named? It seems unlikely because everything was working all fine until my VSCode was updated to the January release. Right until then it was working with no issues.
TJKlein commentedon Feb 4, 2022
I have the same issue with VSCode (Mac). The item in the status bar, where one previously could select the interpreter has disappeared. For me, there is no pop-up warning of no installation. It just uses the default Python environment and there is no option of changing it.
I could fix it by deleting VSCode (from the application folder) and installing it again. Then it worked and showed the different Python enviroments.
brettcannon commentedon Feb 4, 2022
Tassilo Klein (@TJKlein) this actually isn't the same issue for you as you're probably in an experiment we are running; see #18283 .
karrtikr commentedon Feb 4, 2022
Paritosh Panda (@tashi21) That could indeed be the case, can you provide the logs as mentioned in the issue template in the scenario when this issue was happening?
Logs
Output for
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)tashi21 commentedon Feb 4, 2022
karrtikr commentedon Apr 11, 2022
Fixed with #18878, should be out in the pre-release version of the extension in a day. To try it: