![](/img/trans.png)
[英]My encryption code can't find a file “FileNotFoundError: [Errno 2] No such file or directory: file”
[英]Visual Studio Code doesn't find my python file. [Errno 2] No such file or directory
我正在努力使用 Visual Studio Code python 編譯器。 每當我嘗試運行它說的代碼時
python: can't open file 'c:\Users\User\Desktop\Programowasko\Python\Cybepunk encounter
calculator\cyberpunk.py': [Errno 2] No such file or directory
現在唯一寫在那里的代碼是print("Hello World")
。 還有任何其他最近有效的代碼,現在都沒有了。
您是否嘗試過使用沒有空格的文件目錄? 例如Cybepunk_encounter_calculator
甚至像這樣用雙引號""
括起來
錯誤是由於空間。 也許以下可以幫助你
python "c:\Users\User\Desktop\Programowasko\Python\Cybepunk encounter calculator\cyberpunk.py"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.