在anaconda \ env中,如何设置和运行来自komodo edit的不同python3环境版本? [英] how to set and run different python3 environment versions from komodo edit while in anaconda\env?

查看:226
本文介绍了在anaconda \ env中,如何设置和运行来自komodo edit的不同python3环境版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Komodo Edit中为第二个python环境设置命令运行工具?

How do I set the command run tool for a second environment of python in Komodo Edit?

默认情况下,Windows环境指南将Komodo设置为X:\folder1\Anaconda\python.exe(py版本3.7.4,MKL 2019.10(服务2.3.0).

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).

让我说:X:\folder1\Anaconda\envs\MKL2018并包括python 3.6.4版本.和MKL 2018.0.2(服务1.1.2)从Anaconda命令提示符下的cmd行说明中,我得到了预期的结果:

Let say I have: X:\folder1\Anaconda\envs\MKL2018 and includes python version 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:

conda activate MKL2018

python X:\folder2\Examples\LookupTable.py

文件:LookupTable.py | "python版本" :3.7.4.

File : LookupTable.py | "python version" : 3.7.4.

.. snippet ...

..snippet...

但是当我尝试实现X:\folder1\Anaconda\envs\MKL2018的python路径时,不是来自编辑器.将%(python3)更改为%(X:\folder1\Anaconda\envs\MKL2018\python3)不起作用.

But not from the editor when I try to implement the python path to X:\folder1\Anaconda\envs\MKL2018. Changing %(python3) to %(X:\folder1\Anaconda\envs\MKL2018\python3) doesn't work.

我拥有的ktf文件如下:

The ktf-file I have is as follows:

komodo.doCommand('cmd_saveAll');
ko.run.output.kill(-1);
setTimeout(function(){
   ko.run.runEncodedCommand(window, '%(python3) \"%F\" {\'cwd\': u\'%D\'}');
}, 100);

我想我必须在那里进行一些更改并将ktf保存为另一个名称(例如mklpy)...但是要更改什么?

I assume I have to change something there and save the ktf under another name (e.g. mklpy)... but what to change?

推荐答案

找到合适的捷径解决方案(将其保存在python3环境中)相当麻烦,但是如果您不使用python 2.x版本,更长,没有安装;可以完成以下操作:

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; the following can be done:

  1. 转到编辑\首选项"
  2. 然后在子标题语言"下转到"Python"默认Python解释器
  3. 在这里选择正确的路径,例如"X:\ folder1 \ Anaconda \ envs \ MKL2018 \ python.exe"
  4. 应用并关闭标签.

此后,您可以使用以下命令创建新的ktf文件:

Thereafter you can create a new ktf-file with:

komodo.doCommand('cmd_saveAll');
ko.run.output.kill(-1);
setTimeout(function(){
   ko.run.runEncodedCommand(window, '%(python) \"%F\" {\'cwd\': u\'%D\'}');
}, 100);

...现在请记住使用'%(python)而不是'%(python3)

... now keep in mind to use the '%(python) instead of '%(python3)

...瞧,您完成了...

... voila and you're done...

这篇关于在anaconda \ env中,如何设置和运行来自komodo edit的不同python3环境版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆