-
Notifications
You must be signed in to change notification settings - Fork 29
Closed as not planned
Description
Today I noticed that the terminal prompt in VS Code does not include the selected (star icon, workspace environment) Conda environment in the Python Environments extension. I did some digging and found that conda info --json fails.
I am not sure when this problem started because I just reinstalled Linux and have only used this system for 2 days.
Step to reproduce
- Open VS Code.
- Open Python Environments extension side panel.
- The list will contain Conda environments and the Conda workspace environment
data-scienceis selected. - Log of Python Environments will contain calls:
poetry --version: call succeeds,conda info --json: call fails,poetry --version: call fails.
> conda info --json
Debug: Failed to spawn conda binary conda Error: spawn conda ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:285:19)
at onErrorNT (node:internal/child_process:483:16)
at processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn conda',
path: 'conda',
spawnargs: [ 'info', '--json' ]
}
Error: Error: Command failed: poetry --version
/bin/sh: line 1: poetry: command not found
at genericNodeError (node:internal/errors:984:15)
at wrappedFn (node:internal/errors:538:14)
at ChildProcess.exithandler (node:child_process:423:12)
at ChildProcess.emit (node:events:518:28)
at maybeClose (node:internal/child_process:1104:16)
at Socket.<anonymous> (node:internal/child_process:456:11)
at Socket.emit (node:events:518:28)
at Pipe.<anonymous> (node:net:343:12) {
code: 127,
killed: false,
signal: null,
cmd: 'poetry --version'
}
Debug: Time taken to run poetry --version in ms 79
Debug: Failed to find poetry for poetry
- After
condais not found, it starts probing it at some locations. - After VS Code window is refreshed, Conda environments are not listed anymore.
- Same errors in the log.
When opening a new instance of VS Code, I can launch (base) Conda terminal by clicking the terminal icon next to it in the list. Clicking the same button for the data-science environment opens the correct terminal (correct Python version), but the prompt (data-science) is missing.
Calling conda info --json works on the system. Using Conda environments manually works as well.
Environment
- OS: EndeavourOS (up to date)
- VS Code: 1.98.2
- Conda: 24.11.3
- Mamba: 1.5.12
- Miniforge3: 24.11.3-2
Metadata
Metadata
Assignees
Labels
No labels