目前的问题:
sublime + LSP + lsp-pyright
不能够正确找到虚拟环境中 python 解析器的路径. 使用的仍旧是默认 python.exe
所以不能够引入虚拟环境中的包.
在 lsp-pyright 自定义配置中写入了:
{
"venvPath": ".\\venv\\Scripts\\python.exe",
"venv": "venv"
}
通过打印 sys.executable, 使用的仍然是系统默认 python 解析器.
PS: 我尝试过 venvPath 路径的多种写法.
"venvPath": "./venv/Scripts/python.exe",
"venvPath": "python 的绝对路径"
问题依旧..
尝试过通过项目内的 pyrightconfig.json 配置.
或者 Preferences -> Packages settings -> LSP -> Server -> lsp-pyright
中写入如上配置:
求指点....
sublime + LSP + lsp-pyright
不能够正确找到虚拟环境中 python 解析器的路径. 使用的仍旧是默认 python.exe
所以不能够引入虚拟环境中的包.
在 lsp-pyright 自定义配置中写入了:
{
"venvPath": ".\\venv\\Scripts\\python.exe",
"venv": "venv"
}
通过打印 sys.executable, 使用的仍然是系统默认 python 解析器.
PS: 我尝试过 venvPath 路径的多种写法.
"venvPath": "./venv/Scripts/python.exe",
"venvPath": "python 的绝对路径"
问题依旧..
尝试过通过项目内的 pyrightconfig.json 配置.
或者 Preferences -> Packages settings -> LSP -> Server -> lsp-pyright
中写入如上配置:
求指点....
