簡體   English   中英

嘗試在 Sublime Text 中運行腳本時出現“WinError 2 - 系統找不到指定的文件”

[英]“WinError 2 - The system cannot find the file specified” when trying to run script in Sublime Text

嘗試在 Sublime Text 上運行 Python 時出現此錯誤。 我想我已經搞砸了所有的路徑變量。

Python 已經安裝,這是構建系統:

{
     "cmd": ["python3", "-u", "$file")
}

錯誤:

[WinError 2] The system cannot find the file specified
[path: C:\Users\Home\AppData\Local\Programs\Python\Python39\;C:\Users\Home\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\Home\AppData\Local\Programs\Python\Python39\]

這些是環境變量的屏幕截圖:

在此處輸入圖像描述

我究竟做錯了什么?

好的,問題不在於變量,而在於構建系統。

我改為:

{
   "cmd": ["python", "$file"]
}

現在它工作正常。

我不知道“-u”是什么意思,所以我避免了。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM