python - Is it possible to add an interpreter to VSCode's list? - Stack Overflow

I switch between CPython and PyPy every so often, and while the former is always present in Python: Sel

I switch between CPython and PyPy every so often, and while the former is always present in Python: Select Interpreter..., the latter never sticks and I have to input the path manually. I'd like to save it as a permanent option globally.

VSCode's documentation says:

The extension automatically looks for interpreters in the following locations, in no particular order:

  • Standard install paths such as /usr/local/bin, /usr/sbin, /sbin, c:\\python36, etc.
  • Virtual environments located [...]
  • Interpreters created by pyenv, Pipenv, and Poetry.
  • Virtual environments located [...]
  • Conda environments [...]
  • Interpreters installed in a .direnv folder for direnv under the workspace folder.

I'm not sure what would constitute a "standard install path" for PyPy (though apparently Inkscape's Python is included?!). I've tried creating a virtual environment under python.venvPath with --system-site-packages, but it doesn't seem to be detected, even when others are.

I switch between CPython and PyPy every so often, and while the former is always present in Python: Select Interpreter..., the latter never sticks and I have to input the path manually. I'd like to save it as a permanent option globally.

VSCode's documentation says:

The extension automatically looks for interpreters in the following locations, in no particular order:

  • Standard install paths such as /usr/local/bin, /usr/sbin, /sbin, c:\\python36, etc.
  • Virtual environments located [...]
  • Interpreters created by pyenv, Pipenv, and Poetry.
  • Virtual environments located [...]
  • Conda environments [...]
  • Interpreters installed in a .direnv folder for direnv under the workspace folder.

I'm not sure what would constitute a "standard install path" for PyPy (though apparently Inkscape's Python is included?!). I've tried creating a virtual environment under python.venvPath with --system-site-packages, but it doesn't seem to be detected, even when others are.

Share Improve this question asked Mar 12 at 18:55 heckohecko 211 silver badge3 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

Use settings.json:

"python.defaultInterpreterPath"

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744733604a4590608.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信