Skip to content
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

Broken Python venv selection #22267

Closed
quen-de opened this issue Oct 6, 2023 · 3 comments
Closed

Broken Python venv selection #22267

quen-de opened this issue Oct 6, 2023 · 3 comments
Assignees
Labels
triage-needed Needs assignment to the proper sub-team

Comments

@quen-de
Copy link

quen-de commented Oct 6, 2023

Type: Bug

Selecting a venv either globally or per project doesn't change VS Code's behavior: the default system-wide python binary is always used, in every project.

It happened after I killed a terminal running a frozen python script. Relaunching VS Code or reinstalling the Python module didn't solve the issue.

VS Code version: Code 1.83.0 (e7e037083ff4455cf320e344325dacb480062c3c, 2023-10-03T16:12:16.321Z)
OS version: Windows_NT x64 10.0.22621
Modes:

System Info
Item Value
CPUs 13th Gen Intel(R) Core(TM) i7-13700H (20 x 2918)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 31.68GB (14.10GB free)
Process Argv --crash-reporter-id 0e95a44c-dbbe-4d34-bd86-be6f31c4378f
Screen Reader no
VM 0%
Extensions (25)
Extension Author (truncated) Version
vscode-django bat 1.14.0
composer-php-vscode DEV 1.39.13943
phptools-vscode DEV 1.39.13943
profiler-php-vscode DEV 1.39.13943
githistory don 0.6.20
python-extension-pack don 1.7.0
vscode-html-css ecm 1.13.1
githd hui 2.3.3
vsc-python-indent Kev 1.18.0
rainbow-csv mec 3.7.1
git-graph mhu 1.30.0
vscode-docker ms- 1.26.1
python ms- 2023.18.0
vscode-pylance ms- 2023.10.10
jupyter ms- 2023.9.1102792234
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.0.17
vscode-jupyter-cell-tags ms- 0.1.8
vscode-jupyter-slideshow ms- 0.1.5
autodocstring njp 0.6.1
pdf tom 1.2.2
intellicode-api-usage-examples Vis 0.2.8
vscodeintellicode Vis 1.2.30
jinja who 0.0.8
markdown-all-in-one yzh 3.5.1
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscorecescf:30445987
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
vsclangdf:30486550
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
2e4cg342:30602488
89544117:30613380
2i9eh265:30646982
showlangstatbar:30737416
03d35959:30757346
pythonfmttext:30731395
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
pythonnosmt12:30797651
pythonidxptcf:30805731
pythonnoceb:30805159
copilotsettingt:30839829
dsvsc013:30795093
dsvsc014:30804076
diffeditorv2:30821572
pythonmpsinfo:30842941
dsvsc015:30845448

@vscodenpa vscodenpa added the triage-needed Needs assignment to the proper sub-team label Oct 6, 2023
@rebornix rebornix transferred this issue from microsoft/vscode Oct 19, 2023
@karthiknadig
Copy link
Member

@quen-de You probably need to clear the cache. Please run the Python: Clear cache and reload command

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Oct 19, 2023
@karrtikr
Copy link

If that doesn't help please provide the debug logs which can help diagnose the issue:

  • Run Developer: Set log level command
  • Select Trace
  • Run Developer: Reload Window command
  • Provide the output:
Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

@quen-de
Copy link
Author

quen-de commented Oct 20, 2023

Hi @karthiknadig , @karrtikr , thank you for your answer. It looks like clearing the cache worked, I got met with an "invalid virtual environment" for all my projects, and after re-specifying the path to the correct binary, everything was fine. Sorry that I cannot better pinpoint the causation.

@quen-de quen-de closed this as completed Oct 20, 2023
@github-actions github-actions bot removed the info-needed Issue requires more information from poster label Oct 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

6 participants