使用 Sublime Text 3,如何使用我创建的 conda 环境构建 python 文件http://conda.pydata.org/docs/using/envs.html http://conda.pydata.org/docs/using/envs.html
NOTE: This will work for virtual environments created with conda
as well as venv
or virtualenv
, you just need to activate it first to find the path to the python[3]
executable.
一个标准的Python.sublime-build https://www.sublimetext.com/docs/3/build_systems.html文件看起来像这样:
{
"cmd": ["/path/to/python", "-u", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}
使用特定产品所需要做的一切conda
环境是修改路径python
or python3
环境中可执行。要找到它,请激活您的环境并输入(取决于您使用的版本)
which python
or
which python3
在 Linux/macOS 上,或者
where python
在 Windows 上,然后将路径复制到您的自定义路径中.sublime-build
文件。将文件保存在您的Packages/User
目录,然后确保通过以下方式选择正确的目录Tools -> Build System
在建造之前。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)