Repository navigation
Unable to discover Pixi environment #23911
Copy link
Copy link
Closed as not planned
Labels
area-environmentsFeatures relating to handling interpreter environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from posterIssue requires more information from poster
Description
Type: Bug
I am connecting to a remote host (using Remote Development extension) that has a pixi project. I have the pre-release version of the MS Python extension. When I try to select a Python interpreter, none are available. I see this in the logs:
024-08-05 21:10:53.415 [info] Experiment 'pythonCreateEnvOnPipInstall' is active
2024-08-05 21:10:53.415 [info] Experiment 'pythonRecommendTensorboardExt' is active
2024-08-05 21:10:53.415 [info] Experiment 'pythonSurveyNotificationcf' is active
2024-08-05 21:10:53.415 [info] Experiment 'pythonTerminalEnvVarActivation' is active
2024-08-05 21:10:53.415 [info] Experiment 'pythonTestAdapter' is active
2024-08-05 21:10:53.415 [info] Default formatter is set to null for workspace /home/eighty
2024-08-05 21:10:53.415 [info] Python interpreter path: ./b3d/.pixi/envs/default/bin/python
2024-08-05 21:10:53.470 [info] > pyenv which python
2024-08-05 21:10:53.470 [info] cwd: .
2024-08-05 21:10:53.559 [info] > pixi --version
2024-08-05 21:10:53.560 [error] [Error: spawn pixi ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:286:19)
at onErrorNT (node:internal/child_process:484:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)] {
errno: -2,
code: 'ENOENT',
syscall: 'spawn pixi',
path: 'pixi',
spawnargs: [ '--version' ]
}
2024-08-05 21:10:53.560 [warning] could not find a pixi interpreter for the interpreter at /home/eighty/b3d/.pixi/envs/default/bin/python
2024-08-05 21:10:53.592 [info] > conda info --json
2024-08-05 21:10:54.743 [info] Starting Pylance language server.Extension version: 2024.13.2024080501
VS Code version: Code 1.92.0 (b1c0a14de1414fcdaa400695b4db1c0799bc3124, 2024-07-31T23:26:45.634Z)
OS version: Linux x64 6.9.3-76060903-generic
Modes:
Remote OS version: Linux x64 6.5.0-1023-gcp
- Python version (& distribution if applicable, e.g. Anaconda): 3.12.4
- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Pixi
- Value of the
python.languageServersetting: Default
User Settings
languageServer: "Pylance"
Installed Extensions
| Extension Name | Extension Id | Version |
|---|---|---|
| JavaScript Debugger | ms-vscode.js-debug | 1.92.0 |
| Jupyter | ms-toolsai.jupyter | 2024.8.2024080201 |
| Jupyter Cell Tags | ms-toolsai.vscode-jupyter-cell-tags | 0.1.9 |
| Jupyter Notebook Renderers | ms-toolsai.jupyter-renderers | 1.0.19 |
| Jupyter Slide Show | ms-toolsai.vscode-jupyter-slideshow | 0.1.6 |
| Pylance | ms-python.vscode-pylance | 2024.7.1 |
| Python | ms-python.python | 2024.13.2024080501 |
| Python Debugger | ms-python.debugpy | 2024.10.0 |
| Table Visualizer for JavaScript Profiles | ms-vscode.vscode-js-profile-table | 1.0.9 |
System Info
| Item | Value |
|---|---|
| CPUs | 13th Gen Intel(R) Core(TM) i9-13900H (20 x 2586) |
| 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) | 1, 1, 1 |
| Memory (System) | 31.19GB (16.89GB free) |
| Process Argv | --crash-reporter-id 01574559-2a39-4ee0-bc34-438099f06da6 |
| Screen Reader | no |
| VM | 0% |
| DESKTOP_SESSION | pop |
| XDG_CURRENT_DESKTOP | Unity |
| XDG_SESSION_DESKTOP | pop |
| XDG_SESSION_TYPE | x11 |
| Item | Value |
|---|---|
| Remote | SSH: aaron-b3d-test.us-west1-a.probcomp-caliban |
| OS | Linux x64 6.5.0-1023-gcp |
| CPUs | Intel(R) Xeon(R) CPU @ 2.20GHz (32 x 0) |
| Memory (System) | 125.78GB (121.85GB free) |
| VM | 0% |
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscoreces:30445986
vscod805:30301674
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
vscaat:30438848
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
pythongtdpath:30769146
welcomedialogc:30910334
pythonnoceb:30805159
asynctok:30898717
pythonregdiag2:30936856
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
accentitlementst:30995554
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
f3je6385:31013174
pythoncenvpt:31062603
a69g1124:31058053
dvdeprecation:31068756
dwnewjupytercf:31046870
impr_priority:31102340
nativerepl1:31104043
refactort:31108082
ccplti:31103428
pythonrstrctxt:31103193
1iic9185:31097392
wkspc-onlycs-c:31106320
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-environmentsFeatures relating to handling interpreter environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from posterIssue requires more information from poster
Activity
eightysteele commentedon Aug 5, 2024
(Just to be clear, the
pixibinary is available on the host and in the PATH)anthonykim1 commentedon Aug 9, 2024
Aaron Steele (@eightysteele) Thanks for filing this.
Does the entire extension crash on you/not load, or is the only symptom that you cannot see any available Python interpreters.
Also does this problem persist when you DONT have pixi for a Python project?
eightysteele commentedon Aug 9, 2024
Anthony Kim (@anthonykim1) no crash, the only symptom is that I cannot see any available Python interpreters for my
pixiproject. In particular, I have two environments defined (cpuandgpu) and they don't show up.Here's a repro....
I create a new Google Cloud VM (using
gcloud) and then connect to it throughvscodeusing the remote development extension.From
vscodeterminal that's connected to my VM, I do the following:Then I install the official MS Python extension (pre-release) and open the "output" window and select "Python". Here's what i see:
And then as a final thing, "Select Interpreter" doesn't show
pixienvironments (unsurprisingly, given the errors).Hope that helps!
Attempt to handle pixi error more gracefully (#23937)
anthonykim1 commentedon Aug 12, 2024
Aaron Steele (@eightysteele) Thanks much for detailed logs here.
I just merged in #23937 so hopefully that will clear things out for us. Error should be less aggressive but also more verbose and detailed. That being said, starting TOMORROW, can you please give the latest pre-release of Python extension a try and see if you get the same symptoms + output logs?
For your scenario, it seems more like the issue with discovery of pixi environment itself?
My follow up questions are:
anthonykim1 commentedon Aug 13, 2024
I have additional PR here: #23942
eightysteele commentedon Aug 19, 2024
Anthony Kim (@anthonykim1) thank you! is there anything i can do to help test out these changes?
anthonykim1 commentedon Aug 20, 2024
Hello Aaron Steele (@eightysteele) Can you install the latest pre-release version of Python extension and see if you can repro the problem? I've merged in #23937 and #23942 will be merged with approval.
I would assume
will still be there without #23942, but error should all go away when #23942 is merged too.
eightysteele commentedon Sep 13, 2024
Hi Anthony Kim (@anthonykim1)! In
v2024.15.2024091301 (pre-release)when I open a Pixi project folder, it doesn't auto-detect the environments defined in.pixi/envs. Is that expected behavior? I can send a repro if helpful. Thanks!anthonykim1 commentedon Sep 16, 2024
Hello Aaron Steele (@eightysteele) Sorry that you are facing this :/
Was hoping that it would be auto-detected but we are seeing some issues with pixi discovery at the moment.
Have you tried manually entering the path to the pixi env?
#23975 (comment) might help you. Make sure you enter the relative path in respect to your workspace and not the absolute path for the reason of: #24042
Let me know how this goes! -Thanks
hadim commentedon Sep 18, 2024
I am hitting the same issue where the local pixi default env is never detected and I must enter its path manually every time.
hadim commentedon Sep 18, 2024
Could that be due to pixi introducing environments a few months ago?
In short there is no one single env anymore such as
.pixi/env/bin/pythonbut potentially many with one default one calleddefaultsuch as.pixi/envs/default/bin/python.anthonykim1 commentedon Sep 24, 2024
Hadrien Mary (@hadim) when you enter the path for pixi, are you able to use that pixi environment? I'm curious of whether you are entering an absolute path, relative to workspace, etc
This is quite possible. And also related: #24042
I'm curious to see if switching the native locator setting to be set to "js" help with automatically detecting pixi environment for you guys. Aaron Steele (@eightysteele) Hadrien Mary (@hadim)
Thanks all for your support,
hadim commentedon Sep 24, 2024
Switching to python locator
jsworks for me (after restarting vscode).anthonykim1 commentedon Sep 24, 2024
Hadrien Mary (@hadim) Working in a sense that your pixi environment is properly discovered, AND you were able to use that pixi environment, correct?
hadim commentedon Sep 24, 2024
yes exactly. all the pixi's envs in the current workspace are correctly detected and they also all work.
anthonykim1 commentedon Sep 24, 2024
Hadrien Mary (@hadim) that helps a ton, thank you for verifying that.
That is expected behavior at the moment - the "native" locator doesn't support discovering pixi environment atm, so I would just leave your locator to "js" so that it could auto-detect your pixi environment. I'm hoping pixi discovery for native locator comes in the future, but can't guarantee you anything now.
I'm curious to see if the workaround works for Aaron Steele (@eightysteele) too!
[-]Pixi[/-][+]Unable to discover Pixi environment[/+]github-actions commentedon Oct 25, 2024
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!