forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
info-neededIssue requires more information from posterIssue requires more information from postertriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
Description
Type: Bug
Behaviour
Pixi environments seem no longer detected by the locator code for me.
Steps to reproduce:
mkdir -p /tmp/foobar
cd /tmp/foobar
pixi init
pixi add python
pixi run ls
touch test.py
code .
If I try setting the interpreter path by hand, I get:
2024-12-10 11:34:05.730 [error] Python Extension: sendTelemetry l [Error]: Failed to resolve env ".pixi/envs/default/bin/python"
at ae (/Users/christianroth/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/out/client/extension.js:2:2037533)
at oe (/Users/christianroth/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/out/client/extension.js:2:2035493)
at Immediate.<anonymous> (/Users/christianroth/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/out/client/extension.js:2:2031787)
at processImmediate (node:internal/timers:483:21) {
code: -4,
data: undefined
}
2024-12-10 11:34:05.734 [info] Discover tests for workspace name: foobar - uri: /private/tmp/foobar
2024-12-10 11:34:05.734 [info] Python interpreter path: ./.pixi/envs/default/bin/python
2024-12-10 11:34:05.736 [info] > conda info --json
2024-12-10 11:34:05.736 [info] shell: zsh
2024-12-10 11:34:06.039 [info] > conda run -n default --no-capture-output python ~/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/python_files/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/python_files/printEnvVariables.py
2024-12-10 11:34:06.039 [info] shell: zsh
2024-12-10 11:34:06.220 [error] getActivatedEnvironmentVariables Error: Command failed: conda run -n default --no-capture-output python /Users/christianroth/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/python_files/get_output_via_markers.py /Users/christianroth/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/python_files/printEnvVariables.py
EnvironmentLocationNotFound: Not a conda environment: /Users/christianroth/miniforge3/envs/default
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:531:35)
at maybeClose (node:internal/child_process:1105:16)
at Socket.<anonymous> (node:internal/child_process:457:11)
at Socket.emit (node:events:519:28)
at Pipe.<anonymous> (node:net:339:12) {
code: 1,
killed: false,
signal: null,
cmd: 'conda run -n default --no-capture-output python /Users/christianroth/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/python_files/get_output_via_markers.py /Users/christianroth/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/python_files/printEnvVariables.py'
}
2024-12-10 11:34:06.221 [info] > conda info --json
2024-12-10 11:34:06.221 [info] shell: bash
2024-12-10 11:34:06.516 [info] > conda run -n default --no-capture-output python ~/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/python_files/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/python_files/printEnvVariables.py
2024-12-10 11:34:06.516 [info] shell: bash
2024-12-10 11:34:06.678 [error] getActivatedEnvironmentVariables Error: Command failed: conda run -n default --no-capture-output python /Users/christianroth/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/python_files/get_output_via_markers.py /Users/christianroth/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/python_files/printEnvVariables.py
EnvironmentLocationNotFound: Not a conda environment: /Users/christianroth/miniforge3/envs/default
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:531:35)
at maybeClose (node:internal/child_process:1105:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:305:5) {
code: 1,
killed: false,
signal: null,
cmd: 'conda run -n default --no-capture-output python /Users/christianroth/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/python_files/get_output_via_markers.py /Users/christianroth/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/python_files/printEnvVariables.py'
}
2024-12-10 11:34:32.944 [info] Native locator: Refresh started
2024-12-10 11:34:32.953 [info] Conda environment manager found at: /Users/christianroth/miniforge3/bin/conda
2024-12-10 11:34:32.977 [info] Native locator: Refresh finished in 32 ms
2024-12-10 11:34:32.978 [info] Discover tests for workspace name: foobar - uri: /private/tmp/foobar
2024-12-10 11:34:32.979 [info] > conda run -n default --no-capture-output python ~/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/python_files/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/python_files/printEnvVariables.py
2024-12-10 11:34:32.979 [info] shell: zsh
2024-12-10 11:34:33.167 [error] getActivatedEnvironmentVariables Error: Command failed: conda run -n default --no-capture-output python /Users/christianroth/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/python_files/get_output_via_markers.py /Users/christianroth/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/python_files/printEnvVariables.py
EnvironmentLocationNotFound: Not a conda environment: /Users/christianroth/miniforge3/envs/default
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:531:35)
at maybeClose (node:internal/child_process:1105:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:305:5) {
code: 1,
killed: false,
signal: null,
cmd: 'conda run -n default --no-capture-output python /Users/christianroth/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/python_files/get_output_via_markers.py /Users/christianroth/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/python_files/printEnvVariables.py'
}
2024-12-10 11:34:33.168 [info] > conda run -n default --no-capture-output python ~/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/python_files/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/python_files/printEnvVariables.py
2024-12-10 11:34:33.168 [info] shell: bash
2024-12-10 11:34:33.331 [error] getActivatedEnvironmentVariables Error: Command failed: conda run -n default --no-capture-output python /Users/christianroth/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/python_files/get_output_via_markers.py /Users/christianroth/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/python_files/printEnvVariables.py
EnvironmentLocationNotFound: Not a conda environment: /Users/christianroth/miniforge3/envs/default
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:531:35)
at maybeClose (node:internal/child_process:1105:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:305:5) {
code: 1,
killed: false,
signal: null,
cmd: 'conda run -n default --no-capture-output python /Users/christianroth/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/python_files/get_output_via_markers.py /Users/christianroth/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/python_files/printEnvVariables.py'
}
2024-12-10 11:34:36.382 [error] Python Extension: sendTelemetry l [Error]: Failed to resolve env ".pixi/envs/default/bin/python"
at ae (/Users/christianroth/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/out/client/extension.js:2:2037533)
at oe (/Users/christianroth/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/out/client/extension.js:2:2035493)
at Immediate.<anonymous> (/Users/christianroth/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/out/client/extension.js:2:2031787)
at processImmediate (node:internal/timers:483:21) {
code: -4,
data: undefined
}
Diagnostic data
Output for Python Locator in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
2024-12-10 11:30:49.341 [info] Starting Python Locator /Users/christianroth/.vscode/extensions/ms-python.python-2024.21.2024120501-darwin-arm64/python-env-tools/bin/pet server
2024-12-10 11:30:49.342 [info] Discovered manager: (Conda) /Users/christianroth/miniforge3/bin/conda
2024-12-10 11:30:49.342 [info] Discovered env: /Users/christianroth/miniforge3/bin/python
2024-12-10 11:30:49.346 [info] Discovered env: /usr/bin/python3
2024-12-10 11:30:49.347 [info] Locator Conda took 124.80075ms
2024-12-10 11:30:49.347 [info] Locator Homebrew took 118.060875ms
2024-12-10 11:30:49.347 [info] Locator MacCommandLineTools took 121.4985ms
2024-12-10 11:30:49.347 [info] Locator MacPythonOrg took 117.260291ms
2024-12-10 11:30:49.347 [info] Locator MacXCode took 118.284041ms
2024-12-10 11:30:49.347 [info] Locator PipEnv took 117.773791ms
2024-12-10 11:30:49.347 [info] Locator Poetry took 118.887083ms
2024-12-10 11:30:49.347 [info] Locator PyEnv took 327.584µs
2024-12-10 11:30:49.347 [info] Locator Venv took 1.009625ms
2024-12-10 11:30:49.347 [info] Locator VirtualEnv took 1.016709ms
2024-12-10 11:30:49.347 [info] Locator VirtualEnvWrapper took 1.081167ms
2024-12-10 11:30:49.347 [info] Locator GlobalVirtualEnvs took 1.109ms
2024-12-10 11:30:49.347 [info] Locator Locators took 124.895125ms
2024-12-10 11:30:49.347 [info] Locator Path took 126.013708ms
2024-12-10 11:30:49.347 [info] Locator Workspaces took 118.567834ms
2024-12-10 11:30:49.347 [info] Refresh completed in 126ms
2024-12-10 11:30:49.348 [info] Resolved Python Environment /Users/christianroth/miniforge3/bin/python
2024-12-10 11:30:49.554 [info] Resolved Python Environment /usr/bin/python3
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
2024-12-10 11:30:49.341 [info] Experiment 'pythonRecommendTensorboardExt' is active
2024-12-10 11:30:49.341 [info] Experiment 'pythonSurveyNotification' is active
2024-12-10 11:30:49.341 [info] Experiment 'pythonTerminalEnvVarActivation' is active
2024-12-10 11:30:49.341 [info] Experiment 'pythonTestAdapter' is active
2024-12-10 11:30:49.341 [info] Native locator: Refresh started
2024-12-10 11:30:49.342 [info] Conda environment manager found at: /Users/christianroth/miniforge3/bin/conda
2024-12-10 11:30:49.347 [info] Native locator: Refresh finished in 192 ms
2024-12-10 11:30:49.350 [info] > ~/miniforge3/bin/conda config --get auto_activate_base
2024-12-10 11:30:49.549 [info] > pyenv which python
2024-12-10 11:30:49.549 [info] cwd: .
2024-12-10 11:30:49.554 [info] Python interpreter path: /usr/bin/python3
2024-12-10 11:30:49.575 [info] > ~/miniforge3/bin/conda info --json
2024-12-10 11:30:59.628 [info] Starting Pylance language server.
Extension version: 2024.21.2024120501
VS Code version: Code 1.95.3 (f1a4fb101478ce6ec82fe9627c43efbf9e98c813, 2024-11-13T14:50:04.152Z)
OS version: Darwin arm64 24.1.0
Modes:
- Python version (& distribution if applicable, e.g. Anaconda): 3.9.6
- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): System
- Value of the
python.languageServersetting: Default
User Settings
languageServer: "Pylance"
Installed Extensions
| Extension Name | Extension Id | Version |
|---|---|---|
| Azure Account | ms-vscode.azure-account | 0.12.0 |
| Azure Pipelines | ms-azure-devops.azure-pipelines | 1.247.2 |
| Azure Resources | ms-azuretools.vscode-azureresourcegroups | 0.9.9 |
| Docker | ms-azuretools.vscode-docker | 1.29.3 |
| Even Better TOML | tamasfe.even-better-toml | 0.19.2 |
| GitHub Copilot | GitHub.copilot | 1.249.0 |
| GitHub Copilot Chat | GitHub.copilot-chat | 0.22.4 |
| GitLens — Git supercharged | eamodio.gitlens | 16.0.5 |
| JavaScript Debugger | ms-vscode.js-debug | 1.95.3 |
| JavaScript Debugger Companion Extension | ms-vscode.js-debug-companion | 1.1.3 |
| Jupyter | ms-toolsai.jupyter | 2024.10.0 |
| Jupyter Cell Tags | ms-toolsai.vscode-jupyter-cell-tags | 0.1.9 |
| Jupyter Keymap | ms-toolsai.jupyter-keymap | 1.1.2 |
| Jupyter Notebook Renderers | ms-toolsai.jupyter-renderers | 1.0.21 |
| Jupyter Slide Show | ms-toolsai.vscode-jupyter-slideshow | 0.1.6 |
| Mypy Type Checker | ms-python.mypy-type-checker | 2024.0.0 |
| Pylance | ms-python.vscode-pylance | 2024.12.1 |
| Python | ms-python.python | 2024.21.2024120501 |
| Python Debugger | ms-python.debugpy | 2024.12.0 |
| Ruff | charliermarsh.ruff | 2024.56.0 |
| Table Visualizer for JavaScript Profiles | ms-vscode.vscode-js-profile-table | 1.0.10 |
System Info
| Item | Value |
|---|---|
| CPUs | Apple M3 Max (16 x 2400) |
| 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: enabled webgl: enabled webgl2: enabled webgpu: enabled webnn: disabled_off |
| Load (avg) | 2, 2, 3 |
| Memory (System) | 64.00GB (7.39GB free) |
| Process Argv | --crash-reporter-id 42cef842-40f4-4638-b715-416262941203 |
| Screen Reader | no |
| VM | 0% |
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt551:31179978
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
vscaat:30438848
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythonnoceb:30805159
pythonmypyd1:30879173
2e7ec940:31000449
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
dvdeprecation:31068756
dwnewjupytercf:31046870
nativerepl2:31139839
pythonrstrctxt:31112756
nativeloc1:31192215
cf971741:31144450
iacca1:31171482
notype1cf:31157160
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530
cc @ruben-arts, @pavelzw
pavelzw, lgonzalezsa and MilkClouds
Metadata
Metadata
Assignees
Labels
info-neededIssue requires more information from posterIssue requires more information from postertriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team