我如何使用 SublimeREPL 的虚拟环境?

How do I use Virtual Environments with SublimeREPL?

我是一般编码的初学者,我刚刚发现我们可以创建虚拟环境,但很快就失望地发现 Windows 用户没有任何教程或答案,而且是唯一一个我发现是THIS。哪种解决了我的问题,但并不理想。我想遵循实际上 解决了 我的问题的表格,但它们是针对 mac 和 linux 用户的。那么有人可以帮我吗?

提前致谢!!!

docs中提到:

For virtualenv created environments to be discoverable by SublimeREPL they should be created or symlinked in one of the following:

  • ~/.virtualenvs 默认为 virtualenvwrapper
  • ~/.venvs 默认为 venv

Alternatively, more paths can be added to “python_virtualenv_paths” in the SublimeREPL configuration file.

如果您的 virtualenvs 在另一个目录中创建,请将它们添加到 SublimeREPL.sublime-settings。对我来说,他们在 ~/Envs:

{
    "python_virtualenv_paths": ["C:\Users\my_username\Envs"]
}

假设您使用的是正确的路径,sublimeREPL: Python - virtualenv 允许您 select 您想要使用的 venv: