我正在努力使用Visual Studio代码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")
。还有任何其他代码,最近已经工作,现在它没有
Tags:
在VS代码中,当我们使用命令“python file.py”在其内部终端中运行python文件时,它要求我们转到可执行文件的父文件夹:(请检查文件名和文件夹名的拼写。)
此外,我们通常在VS代码中使用“python”扩展提供的run按钮,它将在终端中自动执行run命令
错误是由空格引起的。 也许下面的内容可以帮助你
您是否尝试过使用没有空格的文件目录?e、 例如
Cybepunk_encounter_calculator
甚至用双引号括起来""
像this相关问题 更多 >
编程相关推荐