I use nvim and Mason to manage the lsp server pyright.
and just set pyright.setup{} and don't set any options.
local lspconfig = require("lspconfig")
lspconfig.pyright.setup{}
Because I usually switch python2 and python3, I install pyenv to manage python versions.
I found use pyenv local command cannot make pyright recognize the correct python.
Then I saw the issue https://github.com/neovim/nvim-lspconfig/issues/717.
It said local file cannot be recognized is normal, but pyenv shell and pyenv activate should be recognize.
But for me, both of two ways cannot work.
my-python2 created by pyenv virtualenv 2.7.18 my-python2 command
using print a still reporting an error. And using pyenv activate is the same error
echo $PATH
/Users/xxxx/.pyenv/shims:/Library/Frameworks/Python.framework/Versions/3.12/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin
So I want to know why cannot work fine like the git issue.
And how I can work fine when I exec pyenv shell or pyenv activate

