[英]how to set and run different python3 environment versions from komodo edit while in anaconda\env?
How do I set the command run tool for a second environment of python in Komodo Edit?如何在 Komodo Edit 中为 Python 的第二个环境设置命令运行工具?
By default the windows environmentals guide Komodo to X:\\folder1\\Anaconda\\python.exe
(py version 3.7.4, MKL 2019.10(service 2.3.0).默认情况下,Windows 环境将 Komodo 引导至
X:\\folder1\\Anaconda\\python.exe
(py 版本 3.7.4,MKL 2019.10(服务 2.3.0)。
Let say I have: X:\\folder1\\Anaconda\\envs\\MKL2018
and includes python version 3.6.4.假设我有:
X:\\folder1\\Anaconda\\envs\\MKL2018
并包含 python 版本 3.6.4。 and MKL 2018.0.2 (service 1.1.2) From below cmd-line instructions at the Anaconda command prompt I get the expected result:和 MKL 2018.0.2 (service 1.1.2) 从下面的 Anaconda 命令提示符处的 cmd-line 说明我得到了预期的结果:
conda activate MKL2018
python X:\folder2\Examples\LookupTable.py
File : LookupTable.py |
文件:LookupTable.py | "python version" : 3.7.4.
“蟒蛇版本”:3.7.4。
..snippet...
..片段...
But not from the editor when I try to implement the python path to X:\\folder1\\Anaconda\\envs\\MKL2018
.但当我尝试实现
X:\\folder1\\Anaconda\\envs\\MKL2018
的 python 路径时,不是来自编辑器。 Changing %(python3)
to %(X:\\folder1\\Anaconda\\envs\\MKL2018\\python3)
doesn't work.将
%(python3)
更改为%(X:\\folder1\\Anaconda\\envs\\MKL2018\\python3)
不起作用。
The ktf-file I have is as follows:我拥有的 ktf 文件如下:
komodo.doCommand('cmd_saveAll');
ko.run.output.kill(-1);
setTimeout(function(){
ko.run.runEncodedCommand(window, '%(python3) \"%F\" {\'cwd\': u\'%D\'}');
}, 100);
I assume I have to change something there and save the ktf under another name (eg mklpy)... but what to change?我假设我必须在那里更改某些内容并将 ktf 保存为另一个名称(例如 mklpy)...但是要更改什么?
It was quite cumbersome to find a fitting short-cut solution (keeping it in the python3 environments) but if you don't use python version 2.x any longer and haven't installed it;找到合适的捷径解决方案(将其保留在python3环境中)非常麻烦,但是如果您不再使用python 2.x版本并且还没有安装它; the following can be done:
可以执行以下操作:
Thereafter you can create a new ktf-file with:此后,您可以使用以下命令创建一个新的 ktf 文件:
komodo.doCommand('cmd_saveAll');
ko.run.output.kill(-1);
setTimeout(function(){
ko.run.runEncodedCommand(window, '%(python) \"%F\" {\'cwd\': u\'%D\'}');
}, 100);
... now keep in mind to use the '%(python)
instead of '%(python3)
...现在请记住使用
'%(python)
而不是'%(python3)
... voila and you're done... ......瞧,你完成了......
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.