microsoft / vscode-python

Python extension for Visual Studio Code
https://aka.ms/pvsc-marketplace
MIT License
4.34k stars 1.19k forks source link

Python installed but not working in VS code #22634

Closed Jisa-star closed 10 months ago

Jisa-star commented 11 months ago

Type: Bug

I have python installed and I have also selected the correct compiler. It was running well but suddenly now it say it can not find python anymore!

VS Code version: Code 1.85.0 (af28b32d7e553898b2a91af498b1fb666fdebe0c, 2023-12-06T20:48:09.019Z) OS version: Windows_NT x64 10.0.19045 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz (4 x 2304)| |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)|7.88GB (2.12GB free)| |Process Argv|F:\\c\\Downloads\\counselling_unit_till mod3 --crash-reporter-id b080cc69-3911-47d1-8733-07f0fc57c73e| |Screen Reader|no| |VM|0%|
Extensions (53) Extension|Author (truncated)|Version ---|---|--- project-manager|ale|12.7.0 vscode-sqlite|ale|0.14.1 arepl|alm|2.0.5 vscode-django|bat|1.14.0 pythoncpp-debug|ben|0.3.0 gitignore|cod|0.9.0 python-snippets|cst|0.1.2 vscode-dash|dee|2.4.0 python-extensions-pack|dem|1.0.2 composer-php-vscode|DEV|1.42.14401 intelli-php-vscode|DEV|0.10.14222 phptools-vscode|DEV|1.42.14401 profiler-php-vscode|DEV|1.42.14401 python-preview|don|0.0.4 git-extension-pack|don|0.1.3 githistory|don|0.6.20 python-environment-manager|don|1.2.4 python-extension-pack|don|1.7.0 gitlens|eam|14.5.2 vscode-firefox-debug|fir|2.9.10 vscode-test-explorer|hbe|2.21.1 better-cpp-syntax|jef|1.17.2 python-resource-monitor|kai|0.2.2 vsc-python-indent|Kev|1.18.0 vscode-python-test-adapter|lit|0.8.1 document|min|2.2.1 black-formatter|ms-|2023.6.0 python|ms-|2023.22.0 vscode-pylance|ms-|2023.11.10 jupyter|ms-|2023.11.1003402403 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 cmake-tools|ms-|1.16.32 cpptools|ms-|1.19.1 cpptools-extension-pack|ms-|1.3.0 test-adapter-converter|ms-|0.1.8 autodocstring|njp|0.6.1 vscode-python-typehint|njq|1.5.1 indent-rainbow|ode|8.3.1 sqlite-viewer|qwt|0.3.13 pythonpack|shi|0.3.0 sourcery|sou|1.14.0 code-spell-checker|str|3.0.1 vscode-djaneiro|the|1.4.2 wolf|tra|0.4.3 cmake|twx|0.0.17 intellicode-api-usage-examples|Vis|0.2.8 vscodeintellicode|Vis|1.2.30 jinja|who|0.0.8 livecode|xir|1.3.10 vscode-open-in-github|ziy|1.3.6 (1 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492:30256859 vslsvsres303:30308271 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 pythonvs932:30410667 py29gd2263:30899288 vscaac:30438847 vsclangdf:30486550 c4g48928:30535728 dsvsc012:30540252 azure-dev_surveyone:30548225 3biah626:30602489 89544117:30613380 vscrp:30673768 a9j8j154:30646983 showlangstatbar:30737416 0bi6i642:30917235 fixshowwlkth:30771522 showindicator:30805244 pythongtdpath:30769146 i26e3531:30792625 welcomedialogc:30910334 pythonnosmt12:30797651 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 dsvsc013:30795093 dsvsc014:30804076 dsvsc015:30845448 pythontestfixt:30902429 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 pythontbext0:30879054 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 aa_t_chat:30882232 dsvsc019cf:30917260 ```
eleanorjboyd commented 11 months ago

Do you think it could be related to this? https://github.com/microsoft/vscode-python/issues/22617. I am wondering if the interpreter is selecting the folder instead of the executable. This would be true if you are on the extension version 2023.22.0 and if downgrading to version 2023.20.0 fixes the issue.

karrtikr commented 11 months ago

Can you try out the pre-release version of the Python extension?

image

If it does not, please provide the debug logs which can help diagnose the issue:

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

``` XXX ```

github-actions[bot] commented 10 months ago

Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off.

Happy Coding!