-
-
Notifications
You must be signed in to change notification settings - Fork 271
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
Python resolution order does not respect PATH #1748
Comments
A quick fix for me was to modify https://github.com/williamboman/mason.nvim/blob/main/lua/mason-core/installer/managers/pypi.lua#L91:
|
My suggested solution would be to just use stock_target and check if it is compatible. If isn't, throw an error and exit rather than trying to use a non-default python. (But, that could be a breaking change for those that rely on the old behaviour). |
Should be fixed in #1736. Note that it will only use the |
I've searched open issues for similar requests
I've manually reviewed logs to find potential errors
I've recently downloaded the latest plugin version of mason.nvim
Problem description
From a conda environment with Python 3.9.17 (picked up by
:checkhealth mason
) pypi installer picks up and uses system python version 3.10. Output from MasonLog:Expected behavior
PATH should be respected. It looks like the culprit is
[resolve_python3](https://github.com/williamboman/mason.nvim/blob/main/lua/mason-core/installer/managers/pypi.lua#L20-L33)()
and probably the call for versioned candidates at https://github.com/williamboman/mason.nvim/blob/main/lua/mason-core/installer/managers/pypi.lua#L91Instead of taking the python resolved by PATH it picks the latest python version that is supported.
Steps to reproduce
PATH="append"
(or"skip"
):Affected packages
ruff-lsp
Neovim version (>= 0.7)
NVIM v0.10.0
Build type: RelWithDebInfo
LuaJIT 2.1.1713484068
Operating system/version
Linux c3se-TP6 6.5.0-41-generic #41~22.04.2-Ubuntu SMP PREEMPT_DYNAMIC Mon Jun 3 11:32:55 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Healthcheck
Screenshots or recordings
No response
The text was updated successfully, but these errors were encountered: