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

Stuck on "Reactivating terminals" - Failed to resolve env #23922

Closed
DrShushen opened this issue Aug 7, 2024 · 37 comments
Closed

Stuck on "Reactivating terminals" - Failed to resolve env #23922

DrShushen opened this issue Aug 7, 2024 · 37 comments
Assignees
Labels
info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team

Comments

@DrShushen
Copy link

Type: Bug

Since the latest update of VSCode Insiders, the Python extension fails to launch (no syntax highlighting etc.), there is a permanent "Reactivating terminals..." in the status bar, and when I select OUTPUT > Python, I see the following error:

2024-08-07 18:35:35.873 [error] sendStartupTelemetry() failed. s [Error]: Failed to resolve env "/mnt/data-linux/miniconda3"
    at ae (/home/user/.vscode-insiders/extensions/ms-python.python-2024.12.2-linux-x64/out/client/extension.js:2:1968174)
    at oe (/home/user/.vscode-insiders/extensions/ms-python.python-2024.12.2-linux-x64/out/client/extension.js:2:1966134)
    at Immediate.<anonymous> (/home/user/.vscode-insiders/extensions/ms-python.python-2024.12.2-linux-x64/out/client/extension.js:2:1962428)
    at processImmediate (node:internal/timers:478:21) {
  code: -4,
  data: undefined
}

Not sure if it is related to the fact that my conda environments are on a mounted partition under /mnt/.

I have tried with Python pre-release and Release versions of the extension, and the issue happens in both cases.

The issue does not happen in vanilla VSCode (non Insiders)


VSCode info

Version: 1.93.0-insider
Commit: d4c4e690b9f1e70291da9a46c5c8ac5ebfbda81a
Date: 2024-08-07T05:03:47.999Z
Electron: 30.1.2
ElectronBuildId: 9870757
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Linux x64 6.8.0-39-generic snap

System info:

## Report details
- **Date generated:**                              2024-08-07 18:41:37

## Hardware Information:
- **Hardware Model:**                              ASUS ROG STRIX B460-H GAMING
- **Memory:**                                      64.0 GiB
- **Processor:**                                   Intel® Core™ i9-10900K × 20
- **Graphics:**                                    NVIDIA GeForce RTX™ 3090
- **Disk Capacity:**                               7.0 TB

## Software Information:
- **Firmware Version:**                            1610
- **OS Name:**                                     Ubuntu 24.04 LTS
- **OS Build:**                                    (null)
- **OS Type:**                                     64-bit
- **GNOME Version:**                               46
- **Windowing System:**                            X11
- **Kernel Version:**                              Linux 6.8.0-39-generic

Tried with Python extension:

  • Release: v2024.12.2
  • Pre-release: v2024.13.2024080701 (pre-release)

Extension version: 2024.12.2
VS Code version: Code - Insiders 1.93.0-insider (d4c4e690b9f1e70291da9a46c5c8ac5ebfbda81a, 2024-08-07T05:03:47.999Z)
OS version: Linux x64 6.8.0-39-generic snap
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i9-10900K CPU @ 3.70GHz (20 x 4899)
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
skia_graphite: disabled_off
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
webnn: disabled_off
Load (avg) 0, 0, 0
Memory (System) 62.70GB (50.98GB free)
Process Argv --no-sandbox --force-user-env --crash-reporter-id 5e036db4-7975-4920-936d-345ce33b1cab
Screen Reader no
VM 0%
DESKTOP_SESSION ubuntu
XDG_CURRENT_DESKTOP Unity
XDG_SESSION_DESKTOP ubuntu
XDG_SESSION_TYPE x11
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
vsaa593:30376534
py29gd2263:31024238
c4g48928:30535728
962ge761:30841072
pythongtdpath:30726887
welcomedialog:30812478
pythonnoceb:30776497
asynctok:30898717
dsvsc013:30777762
dsvsc014:30777825
dsvsc015:30821418
pythonregdiag2:30926734
pythonmypyd1:30859725
2e7ec940:31000449
pythontbext0:30879054
accentitlementst:30870582
dsvsc016:30879898
dsvsc017:30880771
dsvsc018:30880772
cppperfnew:30980852
pythonait:30973460
g316j359:31013175
a69g1124:31018687
dvdeprecation:31040973
dwnewjupytercf:31046870
2f103344:31071589
legacy_priority:31057981
nativerepl1:31104042
refactort:31084545
pythonrstrctxt:31093868
flightc:31105041
wkspc-onlycs-c:31111717
nativeloc1:31111755
wkspc-ranged-c:31111712
cf971741:31111988
fcdif617:31111928

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Aug 7, 2024
@DrShushen
Copy link
Author

More info for debugging this.

I have installed the exact same version of VSCode Insiders but with apt rather than snap, and this issue no longer happens.

See below the version info (the only difference is OS: Linux x64 6.8.0-39-generic vs OS: Linux x64 6.8.0-39-generic snap.

Version: 1.93.0-insider
Commit: d4c4e690b9f1e70291da9a46c5c8ac5ebfbda81a
Date: 2024-08-07T05:03:47.999Z
Electron: 30.1.2
ElectronBuildId: 9870757
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Linux x64 6.8.0-39-generic

Python extension version: v2024.13.2024080701 (pre-release)

@karthiknadig karthiknadig self-assigned this Aug 8, 2024
@zhao-kun
Copy link

zhao-kun commented Aug 9, 2024

Same problems. Except for the difference in the OS version, my VsCode insider version is the same.
Version details:

Commit: d4c4e690b9f1e70291da9a46c5c8ac5ebfbda81a
Date: 2024-08-07T05:03:47.999Z
Electron: 30.1.2
ElectronBuildId: 9870757
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Linux x64 5.10.222-1-MANJARO```

@SanBingYouYong
Copy link

SanBingYouYong commented Aug 16, 2024

Just encountered this on my win11 laptop locally, but when connected via ssh to remote linux server everything is fine.. both environments are set up with miniconda3

2024-08-16 17:02:53.403 [error] Failure during activation. s [Error]: Failed to resolve env "C:\\Users\\13152\\miniconda3"
    at ae (c:\Users\13152\.vscode\extensions\ms-python.python-2024.12.3-win32-x64\out\client\extension.js:2:1968174)
    at oe (c:\Users\13152\.vscode\extensions\ms-python.python-2024.12.3-win32-x64\out\client\extension.js:2:1966134)
    at Immediate.<anonymous> (c:\Users\13152\.vscode\extensions\ms-python.python-2024.12.3-win32-x64\out\client\extension.js:2:1962428)
    at processImmediate (node:internal/timers:478:21) {
  code: -4,
  data: undefined
}
2024-08-16 17:02:53.403 [error] sendStartupTelemetry() failed. s [Error]: Failed to resolve env "C:\\Users\\13152\\miniconda3"
    at ae (c:\Users\13152\.vscode\extensions\ms-python.python-2024.12.3-win32-x64\out\client\extension.js:2:1968174)
    at oe (c:\Users\13152\.vscode\extensions\ms-python.python-2024.12.3-win32-x64\out\client\extension.js:2:1966134)
    at Immediate.<anonymous> (c:\Users\13152\.vscode\extensions\ms-python.python-2024.12.3-win32-x64\out\client\extension.js:2:1962428)
    at processImmediate (node:internal/timers:478:21) {
  code: -4,
  data: undefined
}

And this is not an Insider version:

Version: 1.92.2 (user setup)
Commit: fee1edb8d6d72a0ddff41e5f71a671c23ed924b9
Date: 2024-08-14T17:29:30.058Z
Electron: 30.1.2
ElectronBuildId: 9870757
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.22631

Update:
After leaving it to run for a solid period of time (when I come back) the problem is mysteriously gone. I have no clue what is going on in the whatever backend this might involve but I do feel bad to somehow lose control of my workspace.

@karthiknadig
Copy link
Member

karthiknadig commented Aug 16, 2024

A few things to try:
[Option 1] Try the command Python: Clear Cache and re-load from the command 🎨. I suspect there might be paths in cache that it is trying to find and somehow failing.
[Option 2] Try setting python.locator to native and reload. This will use a newer detector for python that should work faster. But, be sure to be on latest stable (2024.12.3 or greater) to get this.
[Option 3] Try adding this to your user settings.json: "python.experiments.optOutFrom": ["pythonTerminalEnvVarActivation"]

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Aug 16, 2024
@corneliusroemer
Copy link

corneliusroemer commented Aug 17, 2024

Possibly same issue as this: #23963 (I encountered on macOS ARM)

Restarting my computer helped for me. My locator is already set to "native".

@karthiknadig did you maybe mean switch from native to js? The problem could be with native rather than js. At least per #23956 this helped some.

@SanBingYouYong
Copy link

Just encountered this on my win11 laptop locally, but when connected via ssh to remote linux server everything is fine.. both environments are set up with miniconda3

2024-08-16 17:02:53.403 [error] Failure during activation. s [Error]: Failed to resolve env "C:\\Users\\13152\\miniconda3"
    at ae (c:\Users\13152\.vscode\extensions\ms-python.python-2024.12.3-win32-x64\out\client\extension.js:2:1968174)
    at oe (c:\Users\13152\.vscode\extensions\ms-python.python-2024.12.3-win32-x64\out\client\extension.js:2:1966134)
    at Immediate.<anonymous> (c:\Users\13152\.vscode\extensions\ms-python.python-2024.12.3-win32-x64\out\client\extension.js:2:1962428)
    at processImmediate (node:internal/timers:478:21) {
  code: -4,
  data: undefined
}
2024-08-16 17:02:53.403 [error] sendStartupTelemetry() failed. s [Error]: Failed to resolve env "C:\\Users\\13152\\miniconda3"
    at ae (c:\Users\13152\.vscode\extensions\ms-python.python-2024.12.3-win32-x64\out\client\extension.js:2:1968174)
    at oe (c:\Users\13152\.vscode\extensions\ms-python.python-2024.12.3-win32-x64\out\client\extension.js:2:1966134)
    at Immediate.<anonymous> (c:\Users\13152\.vscode\extensions\ms-python.python-2024.12.3-win32-x64\out\client\extension.js:2:1962428)
    at processImmediate (node:internal/timers:478:21) {
  code: -4,
  data: undefined
}

And this is not an Insider version:

Version: 1.92.2 (user setup)
Commit: fee1edb8d6d72a0ddff41e5f71a671c23ed924b9
Date: 2024-08-14T17:29:30.058Z
Electron: 30.1.2
ElectronBuildId: 9870757
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.22631

Update: After leaving it to run for a solid period of time (when I come back) the problem is mysteriously gone. I have no clue what is going on in the whatever backend this might involve but I do feel bad to somehow lose control of my workspace.

This issue occurs again and this time I tried the solution @corneliusroemer mentioned (switching native/js) and switching locator from native to js solved this issue for me after restarting vscode.

@austinmw
Copy link

I got the same error. Fresh install of VSCode (not insiders) on silicon mac. The above solution fixed it:

"python.locator": "js"

Not sure why this is broken, but not happy I wasted over an hour on this..

@corneliusroemer
Copy link

corneliusroemer commented Aug 19, 2024

Thanks for sharing this worked for you @austinmw. I made a Stackoverflow question and answer in the hope more people quickly find the workaround until there's a proper fix: https://stackoverflow.com/questions/78886125/vscode-python-extension-stuck-on-reactivating-terminals/78886126#78886126

Update: wow the Q&A has already 135 views in just 11 hours - this suggests that a lot of people are getting this error. @karthiknadig would be great if someone at MSFT could look at this, I think. Hope the ping is ok in this case.

@karthiknadig
Copy link
Member

There should be a mitigation pushed out in pre-release.

related: #23982

@anthonykim1
Copy link

anthonykim1 commented Sep 3, 2024

Are folks still suffering from this on the latest pre-release version? Just got another issue from #24026 so I want to make sure. Thought this was resolved based on:#23982 (comment)

@corneliusroemer
Copy link

@anthonykim1 I think it's impossible to say - report #24026 you linked to is insufficient to allow any conclusions - it's missing version of extension that's being used.

@anthonykim1
Copy link

anthonykim1 commented Sep 8, 2024

@corneliusroemer Great point -
Are folks using 2024.14.0 https://github.com/microsoft/vscode-python/releases/tag/v2024.14.0 or the latest pre-release of Python extension experiencing this 'reactivating terminals' problem?

@nurpax
Copy link

nurpax commented Sep 11, 2024

FWIW I just hit this with an updated VSCode (not insiders version):

Version: 1.93.0 (system setup)
Commit: 4849ca9bdf9666755eb463db297b69e5385090e3
Date: 2024-09-04T13:02:38.431Z
Electron: 30.4.0
ElectronBuildId: 10073054
Chromium: 124.0.6367.243
Node.js: 20.15.1
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.19045

Found the fix through the SO post, changing the "python.locator" to "js" helped.

@corneliusroemer
Copy link

@nurpax thanks for the report! What's your Python extension version?

@github-actions github-actions bot removed the info-needed Issue requires more information from poster label Sep 11, 2024
@nurpax
Copy link

nurpax commented Sep 11, 2024

Looks like Python is at v2024.14.0. Pylance is v2024.9.1 in case that's relevant here.

@corneliusroemer
Copy link

corneliusroemer commented Sep 11, 2024

@anthonykim1 something seems to have happened recently making this bug more frequent for folks - the views on my Stackoverflow question have shot up like crazy in the last day, I think from 600 to 900, and the question has been open for 23 days. So the view rate might be the highest it has ever been.

Adding a screenshot so we have a trackrecord:

-    0  views on 2024-08-19Z00:31:00 (UTC)
-  558  views on 2024-09-05Z23:04:58 (UTC) [  33 views/day since previous snapshot]
-  947  views on 2024-09-11Z15:54:21 (UTC) [  65 views/day since previous snapshot]
-  986  views on 2024-09-11Z19:28:00 (UTC) [ 262 views/day since previous snapshot]
- >1.5k views on 2024-09-16Z13:17:00 (UTC) [~100 views/day since previous snapshot]
- <2.5k views on 2024-09-20Z20:19:00 (UTC) [<210 views/day since previous snapshot]
- >3.5k views on 2024-09-30Z06:46:00 (UTC) [>100 views/day since previous snapshot]

See: https://web.archive.org/web/20240000000000*/https://stackoverflow.com/questions/78886125/vscode-python-extension-loading-forever-saying-reactivating-terminals

@LeslieTiangang
Copy link

I got the same error. Fresh install of VSCode (not insiders) on silicon mac. The above solution fixed it:

"python.locator": "js"

Not sure why this is broken, but not happy I wasted over an hour on this..

It really saves me!

@khood5
Copy link

khood5 commented Sep 17, 2024

"python.locator": "js"

This helped me as well

@WBeard4
Copy link

WBeard4 commented Sep 23, 2024

"python.locator": "js"

Issue still occurring, this still resolved it.

@Arch881010
Copy link

+1

@fanesz
Copy link

fanesz commented Sep 26, 2024

"python.locator": "js"

It works!, put it to vscode settings.json

@corneliusroemer
Copy link

@karthiknadig what to do for those not on windows? your command assumes people are on windows if I don't misunderstand.

@github-actions github-actions bot removed the info-needed Issue requires more information from poster label Oct 2, 2024
@karthiknadig
Copy link
Member

The same one exists for all other platforms. It would be something like this:

~/.vscode-insiders/extensions/ms-python.python-2024.15.2024092702-<platform>\python-env-tools\bin\pet resolve <minoconda-path>

<platform>: win32-x64, win32-arm64, linux-x64, linux-arm64,linux-armhf, darwin-x64, darwin-arm64, alpine-x64, alpine-arm64

@SaschaCowley
Copy link

I also just ran into this, only I'm not using Conda. From the logs, it looked like vscode-python was trying to activate the wrong virtual environment. Running Python: Clear Cache and Reload Window from the command palette seems to have fixed the issue.

System info
Version: 1.94.0 (user setup)
Commit: d78a74bcdfad14d5d3b1b782f87255d802b57511
Date: 2024-10-02T13:08:12.626Z
Electron: 30.5.1
ElectronBuildId: 10262041
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.22635
ms-python.python: 2024.16.0
Log output
2024-10-04 15:36:09.721 [info] Experiment 'pythonRecommendTensorboardExt' is active
2024-10-04 15:36:09.722 [info] Experiment 'pythonSurveyNotificationcf' is active
2024-10-04 15:36:09.722 [info] Experiment 'pythonTerminalEnvVarActivation' is active
2024-10-04 15:36:09.722 [info] Experiment 'pythonTestAdapter' is active
2024-10-04 15:36:09.722 [info] Native locator: Refresh started
2024-10-04 15:36:09.722 [info] Default formatter is set to charliermarsh.ruff for workspace d:\projects\nvda
2024-10-04 15:36:09.731 [error] Python Extension: interpreterManager.refresh [l [Error]: Failed to resolve env "D:\\projects\\nvda-pr\\.venv"
	at ae (c:\Users\SaschaCowley\.vscode\extensions\ms-python.python-2024.16.0-win32-x64\out\client\extension.js:2:2052229)
	at oe (c:\Users\SaschaCowley\.vscode\extensions\ms-python.python-2024.16.0-win32-x64\out\client\extension.js:2:2050189)
	at Immediate.<anonymous> (c:\Users\SaschaCowley\.vscode\extensions\ms-python.python-2024.16.0-win32-x64\out\client\extension.js:2:2046483)
	at process.processImmediate (node:internal/timers:483:21)] {
  code: -4,
  data: undefined
}
2024-10-04 15:36:10.065 [info] > pyenv which python
2024-10-04 15:36:10.065 [info] cwd: .
2024-10-04 15:36:10.180 [error] [
  'getActivatedEnvironmentVariables, Class name = j, completed in 0ms, has a falsy return value, Arg 1: <Uri:d:\\projects\\nvda>, Arg 2: undefined, Arg 3: undefined, Arg 4: "C:\\\\Program Files\\\\PowerShell\\\\7\\\\pwsh.exe"',
  [l [Error]: Failed to resolve env "D:\\projects\\nvda-pr\\.venv"
  	at ae (c:\Users\SaschaCowley\.vscode\extensions\ms-python.python-2024.16.0-win32-x64\out\client\extension.js:2:2052229)
  	at oe (c:\Users\SaschaCowley\.vscode\extensions\ms-python.python-2024.16.0-win32-x64\out\client\extension.js:2:2050189)
  	at Immediate.<anonymous> (c:\Users\SaschaCowley\.vscode\extensions\ms-python.python-2024.16.0-win32-x64\out\client\extension.js:2:2046483)
  	at process.processImmediate (node:internal/timers:483:21)] {
    code: -4,
    data: undefined
  }
]
2024-10-04 15:36:10.180 [error] Failed to apply terminal env vars undefined [l [Error]: Failed to resolve env "D:\\projects\\nvda-pr\\.venv"
	at ae (c:\Users\SaschaCowley\.vscode\extensions\ms-python.python-2024.16.0-win32-x64\out\client\extension.js:2:2052229)
	at oe (c:\Users\SaschaCowley\.vscode\extensions\ms-python.python-2024.16.0-win32-x64\out\client\extension.js:2:2050189)
	at Immediate.<anonymous> (c:\Users\SaschaCowley\.vscode\extensions\ms-python.python-2024.16.0-win32-x64\out\client\extension.js:2:2046483)
	at process.processImmediate (node:internal/timers:483:21)] {
  code: -4,
  data: undefined
}
2024-10-04 15:36:10.180 [error] [
  'Failed to activate a workspace, Class name = v, completed in 471ms, has a falsy return value, Arg 1: <Uri:d:\\projects\\nvda\\source\\gui\\__init__.py>, Arg 2: {"started":1728020169581}, Return Value: undefined',
  [l [Error]: Failed to resolve env "D:\\projects\\nvda-pr\\.venv"
  	at ae (c:\Users\SaschaCowley\.vscode\extensions\ms-python.python-2024.16.0-win32-x64\out\client\extension.js:2:2052229)
  	at oe (c:\Users\SaschaCowley\.vscode\extensions\ms-python.python-2024.16.0-win32-x64\out\client\extension.js:2:2050189)
  	at Immediate.<anonymous> (c:\Users\SaschaCowley\.vscode\extensions\ms-python.python-2024.16.0-win32-x64\out\client\extension.js:2:2046483)
  	at process.processImmediate (node:internal/timers:483:21)] {
    code: -4,
    data: undefined
  }
]
2024-10-04 15:36:10.180 [error] Failure during activation. [l [Error]: Failed to resolve env "D:\\projects\\nvda-pr\\.venv"
	at ae (c:\Users\SaschaCowley\.vscode\extensions\ms-python.python-2024.16.0-win32-x64\out\client\extension.js:2:2052229)
	at oe (c:\Users\SaschaCowley\.vscode\extensions\ms-python.python-2024.16.0-win32-x64\out\client\extension.js:2:2050189)
	at Immediate.<anonymous> (c:\Users\SaschaCowley\.vscode\extensions\ms-python.python-2024.16.0-win32-x64\out\client\extension.js:2:2046483)
	at process.processImmediate (node:internal/timers:483:21)] {
  code: -4,
  data: undefined
}
2024-10-04 15:36:10.180 [error] sendStartupTelemetry() failed. [l [Error]: Failed to resolve env "D:\\projects\\nvda-pr\\.venv"
	at ae (c:\Users\SaschaCowley\.vscode\extensions\ms-python.python-2024.16.0-win32-x64\out\client\extension.js:2:2052229)
	at oe (c:\Users\SaschaCowley\.vscode\extensions\ms-python.python-2024.16.0-win32-x64\out\client\extension.js:2:2050189)
	at Immediate.<anonymous> (c:\Users\SaschaCowley\.vscode\extensions\ms-python.python-2024.16.0-win32-x64\out\client\extension.js:2:2046483)
	at process.processImmediate (node:internal/timers:483:21)] {
  code: -4,
  data: undefined
}
2024-10-04 15:36:10.192 [info] Native locator: Refresh finished in 558 ms

@karthiknadig
Copy link
Member

karthiknadig commented Oct 4, 2024

@SaschaCowley can you also share the output from “Python locator”. If you still have it.

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Oct 4, 2024
@Silverwolf-x
Copy link

@SaschaCowley Thanks! It helps a lot!

@karthiknadig
Copy link
Member

If you are using conda and run into this issue, please try the pre-release v2024.17.2024101402 .

Copy link

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!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 14, 2024
@eisenreich
Copy link

"Python: Clear Cache and re-load" did it for me - thank you a lot!

@wuutiing
Copy link

The final solution after all solutions above failed is to uninstall python series extensions (Python, Python-debugger, Pylance etc), restart vscode and reinstall them. That finally worked for me.

@jakeweatherhead
Copy link

As per @karthiknadig's suggestions, [Option 1] worked for me (December 2024)

  1. In VS Code, type Ctrl + Shift + P
  2. Type Python: Clear Cache
  3. Select option Python: Clear Cache and Reload Window

Much appreciated

@voorhs
Copy link

voorhs commented Dec 10, 2024

i tried everything above and nothing can fix this issue

i am using pyenv

@karthiknadig
Copy link
Member

@voorhs Create a new issue, and include details, include settings.json, Logs from Output > Python, and Output> Python Locator. Ensure you are on the latest version of VS Code and extension.

@joneuhauser
Copy link

Experienced the same issue. Workaround: Re-create the environment listed in the error message, then everything works again. In my case, the environment listed there had nothing to do with my current project.

@voorhs
Copy link

voorhs commented Dec 15, 2024

i tried everything above and nothing can fix this issue

i am using pyenv

I figured out what the problem was. The thing is that a couple of days before it occurred, my system had a serious failure related to the file system overflow. During this failure, various files were deleted, including the file "~/.local/bin/python3". Now I have recreated this symbolic link and this problem has completely disappeared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests