【发布时间】:2020-02-03 10:25:53
【问题描述】:
VSCode 默认支持许多虚拟环境,并且这些环境的文件是可搜索的。但是,我使用的是Poetry,它的库似乎没有出现在搜索中。
我通过更改项目目录中的.vscode/settings.json 来手动设置我的Python 解释器。 (因为命令面板的 Python: Select interpreter 也不起作用。
{
"python.pythonPath": "~\\AppData\\Local\\pypoetry\\Cache\\virtualenvs\\finance-essentials-37-64-58e2e1Bc-py3.7\\Scripts"
}
我想让~\AppData\Local\pypoetry\Cache\virtualenvs\finance-essentials-37-64-58e2e1Bc-py3.7\Lib\site-packages 中的文件在我的命令 pelette 和代码上下文中可搜索,以便我可以轻松查找库源。
我该怎么做?
【问题讨论】:
-
你可能也想在 Poetry 的 repo 上提问。 github.com/python-poetry/poetry/issues
-
@AKX 是的,但是 Poetry issue 规则规定我应该询问关于 SO 的提示和技巧。 “有关支持问题,请在 StackOverflow 上发帖。”
标签: python visual-studio-code python-poetry