-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Using python and test plugin fails to recognise pixi environment #23975
Comments
Is the .pixi directory at the root of your active workspace? I'm using a multi-root workspace and Vscode can't find Pix envs properly if there isn't a .pixi at the root of each project. In my case, I am using symlinks to the single .pixi I have. |
hi, @PanTheDev. Thank you very much for the advice, the pixi directory is in the project root (in this case |
@PanTheDev Your advice set me on the right track actually, apparently I was typing in the full path when setting the python interpreter in the "enter interpreter path.." field: however, if I use the relative path to the workspace root, the test extension works! One thing that could be a bug or improvement to the vs code-python package is that the listed interpreter file path shows up as the relative path, even if you have typed in the full path. Therefore, I needed to find out that I had typed it incorrectly. |
Great note! Would be important to fix - thanks! |
@karthiknadig what are your thoughts on this issue here regarding relative vs absolute paths and how they are displayed with the environments? |
This should be looked at by @anthonykim1 in case you have some context on this. |
I think the assumption is we pretty much expect and calculate only starting from projectDir/workspaceDir from
Wondering if making this prefix more generic to cover absolute path will resolve this issue. |
Yeah it makes sense that that would help! |
Hi vscode-python folks,
I have been using the Python plugin with pytest and the test plugin for a long time with conda/mamba environments, but I have recently switched to Pixi for python environment management. Using the Python plugin, I have pointed the interpreter to my pixi environment path, and have been able to run notebooks and the like using the interpreter.
However, the test plugin does not recognise the pixi environment as a pixi environment, showing the following output error when searching for the tests:
It appears like it can't find pixi, so is trying to run it as a mamba environment.
I am running vscode using the "remote" plugin on WSL 2 Debian
vscode version:
Python plugin version:
v2024.12.3
Any help would be great, as I can't wait to use all of these new tools together!
The text was updated successfully, but these errors were encountered: