-
Notifications
You must be signed in to change notification settings - Fork 463
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
How to setup the python environment? #1228
Comments
how do u set up your python env? |
@CharlesChiuGit i had done it. |
did mason.log suggest anything? |
where is the |
Use https://github.com/williamboman/mason.nvim?tab=readme-ov-file#commands |
@CharlesChiuGit sorry for the late reply |
hmmm, seems normal in mason.log |
u r sure 'pynvim' is installed in current python env? or u installed in the global python? |
@CharlesChiuGit i have install the |
i install the |
hmmm, i'm not sure why. Env info: |
Can't repro for me too. Try using |
@ayamir I tried executing them, but it still doesn't work |
Not exactly a Python expert, but a skim through the docs seems to suggest that pyright/pylsp has a pretty robust venv detection regime. AFAIU to fix this issue, u could create a {
"venv": "<name-of-the-venv>"
"venvPath": "/path/to/venv",
} If that tweak does the trick (with |
@CharlesChiuGit When i uninstall the pylsp, and close the nvim. and then open the nvim, it auto install the pylsp and doesn't seem to use the pyright |
u install/uninstall pylsp in your venv? |
u also need to disable pylsp in "lua/core/settings.lua" and config pyright . check our wiki on how to do it. |
No matter what I try, nothing seems to work. 😥 |
@SimFG or just remove it in |
Actually I also want to know basedpyright whether is good enough to replace pylsp as @CharlesChiuGit mentioned in #1172. |
hmmm, it got me thinking maybe the error is from plz make sure your env is 100% the same as our default config, otherwise we cant debug. |
Try |
u can also use |
@CharlesChiuGit after reinstall all lsp, it seem to work fine. But it seems that |
that's 100% normal since it's not the pythonic way to do So can u show us what's your |
@CharlesChiuGit @ayamir Thanks a lot lot lot !!! |
yeah, it looks like |
Version confirmation
Following prerequisites
Not a user config issue
Neovim version
v0.9.5
Operating system/version
macOS 13.0.1
Terminal name/version
iterm2 Build 3.4.15
$TERM environment variable
No response
Branch info
main (Default/Latest)
Fetch Preferences
SSH (use_ssh = true)
How to reproduce the issue
when i open my python project, but there are many import error. what should i do to solve it?
thanks a lot for your help and precious time.
i have install the
pvnivm
for the python.Expected behavior
there is no import error
Actual behavior
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: