LSP-pyright: LSP-pyright can't see my Pip packages
Trying to use discord.py with Sublime. Package list:
- ayu & a file icon
- LSP
- LSP-file-watcher-chokidar
- LSP-pyright
- Package Control
- Terminus
Import "discord" could not be resolved Pyright(reportMissingImports)
About this issue
- Original URL
- State: closed
- Created 8 months ago
- Comments: 18
C:\Users\hughb\pythonProject2\Scripts
P.S. For some reason, even after defining the right path in the LSP-pyright config, I still had to delete the path before it was fixed…
@blag Your case looks totally fine to me. You can either modify it to use
python3rather thanpythonor assign a full path. I don’t see any issue there. Eitherpyrightconfig.jsonor ST project config should work, as you stated.But yes, we can further fallback to
python3ifpythonis not found. https://github.com/sublimelsp/LSP-pyright/blob/5cb9cf564db9cd3549d39d42eb076e96fda51e77/plugin.py#L210Though in your case, you want to use venv, so this won’t help.
I am not asking a console but ST console (
ctrl+`). Yet,cmd/powershellare builtin consoles on Windows too.