简体   繁体   English

带有 conda env 的 Sublime Text 4

[英]Sublime Text 4 with conda env

I'd like to run python code I'm editing in Sublime Text 4 in a specific conda env.我想在特定的 conda 环境中运行我在 Sublime Text 4 中编辑的 python 代码。 Questions Virtualenvs in Sublime Text 4 and use conda environment in sublime text 3 asked similar questions. Sublime Text 4 中的 Virtualenvssublime text 3 中的使用 conda 环境提出了类似的问题。 The starting configuration Olgierd Wiśniewski had would serve for me if it worked.如果有效,Olgierd Wiśniewski 的初始配置将为我服务。 I edited his build code to:我将他的构建代码编辑为:

{
    "shell_cmd": "C://Users/steve/anaconda3/envs/PY10_2/python.exe -u \"$file\"",
    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
    "selector": "source.python"
}

saved it to my ST user directory, closed ST and reopened it.将其保存到我的 ST 用户目录,关闭 ST 并重新打开它。 When I selected "Build With" I did not see my new sublime-build.当我选择“Build With”时,我没有看到我的新 sublime-build。

Would someone please set me straight?有人可以让我直截了当吗?

您应该在Tools -> Build System中找到新选项(您的新 sublime-build)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM