Sublimetext3 崇高文本3赢得';我无法在另一个驱动器中识别我的python安装

Sublimetext3 崇高文本3赢得';我无法在另一个驱动器中识别我的python安装,sublimetext3,Sublimetext3,我已经在D:drive中安装了Python3.7.2(专门用于程序)。在安装了Sublime Text的可移植版本后,它将无法识别我的Python安装,当我运行Python程序时,它会出现以下错误:(顺便说一句,我尝试了其他问题中建议的其他方法,但它仍然无法识别我的安装运行。我仍然可以编辑代码,但无法运行它) 升华在尝试运行外部程序时不寻找它们;它只是告诉底层操作系统“运行这个程序”。您看到的错误消息是一条Windows错误消息,告诉您您告诉它执行某些操作,但它不知道它是什么 分解在“生成输出”

我已经在D:drive中安装了Python3.7.2(专门用于程序)。在安装了Sublime Text的可移植版本后,它将无法识别我的Python安装,当我运行Python程序时,它会出现以下错误:(顺便说一句,我尝试了其他问题中建议的其他方法,但它仍然无法识别我的安装运行。我仍然可以编辑代码,但无法运行它)


升华在尝试运行外部程序时不寻找它们;它只是告诉底层操作系统“运行这个程序”。您看到的错误消息是一条Windows错误消息,告诉您您告诉它执行某些操作,但它不知道它是什么

分解在“生成输出”面板中看到的内容:

这是Windows告诉您“您试图运行一个名为
python
的程序,但我不知道该程序是什么。它似乎不是我所知道的内部程序,也不是已知的外部程序

这是一个升华诊断,告诉您升华试图执行的命令以及当时的was目录是“当前”目录

[路径:c:\program files(x86)\intel\intel(r)管理引擎组件\icls\;c:\program files\intel\intel(r)管理引擎组件\icls\;c:\windows\system32;c:\windows;c:\windows\system32\wbem;c:\windows\system32\windowspowershell\v1.0\;c:\windows\system32\openssh\;c:\program files(x86)\intel\intel(r)管理引擎组件\dal;c:\program files\intel\intel(r)管理引擎组件\dal;c:\program files(x86)\intel\intel(r)管理引擎组件\ipt;c:\program files\intel\intel(r)管理引擎组件\ipt;%systemroot%\system32;%systemroot%;%systemroot%\system32\wbem;%systemroot%\system32\windowspowershell\v1.0\;%systemroot%\system32\openssh\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files(x86)\NVIDIA Corporation\PhysX\Common;C:\Users\Arnold\AppData\Local\Microsoft\WindowsApps;]

这是操作系统(在本例中为Windows)知道查找程序的位置列表,这是错误消息所指的“外部命令”。仔细看,这些位置似乎都不在驱动器
D:
上,或者根本没有提到
Python

同样地,当Sublime告诉Windows它需要运行
python
,Windows找不到它,因为此处列出的任何文件夹中都没有任何名为
python
的内容

该问题的解决方案是确保系统
路径
包含
Python
解释器所在的位置。如何执行此操作取决于您使用的操作系统,对于Windows,根据您正在运行的Windows版本也可能略有不同


一般来说,为了使外部命令在Sublime中工作,您需要能够打开命令提示符、终端等,然后输入该命令并使其工作;如果该命令无法运行程序,Sublime也将无法运行该命令。

通过使用
setx
将d:drive添加到路径,成功地将其拼接在一起。工作原理如下魅力。非常感谢你向我解释这一点。
'python' is not recognized as an internal or external command,
operable program or batch file.
[Finished in 0.1s with exit code 1]
[shell_cmd: python -u "D:\Program Files\Python\Python37\MyScripts\GameIdea.py"]
[dir: D:\Program Files\Python\Python37\MyScripts]
[path: c:\program files (x86)\intel\intel(r) management engine components\icls\;c:\program files\intel\intel(r) management engine components\icls\;c:\windows\system32;c:\windows;c:\windows\system32\wbem;c:\windows\system32\windowspowershell\v1.0\;c:\windows\system32\openssh\;c:\program files (x86)\intel\intel(r) management engine components\dal;c:\program files\intel\intel(r) management engine components\dal;c:\program files (x86)\intel\intel(r) management engine components\ipt;c:\program files\intel\intel(r) management engine components\ipt;%systemroot%\system32;%systemroot%;%systemroot%\system32\wbem;%systemroot%\system32\windowspowershell\v1.0\;%systemroot%\system32\openssh\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Users\Arnold\AppData\Local\Microsoft\WindowsApps;]
'python' is not recognized as an internal or external command, operable program or batch file.
[Finished in 0.1s with exit code 1]
[shell_cmd: python -u "D:\Program Files\Python\Python37\MyScripts\GameIdea.py"]
[dir: D:\Program Files\Python\Python37\MyScripts]