Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x 当我在vs代码中运行一个.py文件时,我遇到了这个错误,它说有些东西无法识别,有人能帮我修复吗?_Python 3.x_Visual Studio Code_Vscode Settings - Fatal编程技术网

Python 3.x 当我在vs代码中运行一个.py文件时,我遇到了这个错误,它说有些东西无法识别,有人能帮我修复吗?

Python 3.x 当我在vs代码中运行一个.py文件时,我遇到了这个错误,它说有些东西无法识别,有人能帮我修复吗?,python-3.x,visual-studio-code,vscode-settings,Python 3.x,Visual Studio Code,Vscode Settings,在vs代码中运行.py文件时出现此错误: n38-32" "c:/Users/hassan kh/Desktop/MY FOLDER/Python Projects/1_1.py" & : The term 'C:/Users/hassan kh/AppData/Local/Programs/Python/Python38-32' is not recognized as the name of a cmdlet, function, script file

在vs代码中运行.py文件时出现此错误:

n38-32" "c:/Users/hassan kh/Desktop/MY FOLDER/Python Projects/1_1.py"
& : The term 'C:/Users/hassan kh/AppData/Local/Programs/Python/Python38-32' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or 
if a path was included, verify that the path is correct and try again.
At line:1 char:3
+ & "C:/Users/hassan kh/AppData/Local/Programs/Python/Python38-32" "c:/Users/hassa ...
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:/Users/hassan...hon/Python38-32:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

我删除了Python和vs代码并再次安装了它,但我仍然收到了这个错误。如果以前有人知道或遇到过此问题,请告诉我如何解决此问题?

路径中不是应该使用反斜杠吗。

查看可执行文件是否存在并从路径中删除空格谢谢,您能再解释一下吗?当我在命令提示符下编写python时,它表示python已定义,并显示python版本。但是,从路径中删除空间是什么意思呢?您的用户名有一个空间,桌面上的文件夹有一个空间,请使用其他目录而不是桌面上的目录,只需在C:drive上创建一个目录。我是vs代码的业余爱好者。您能解释一下如何修复它吗?目录的路径使用此路径->windows中的“c:\Users\hassan kh\Desktop\MY FOLDER\Python Projects\1\u 1.py”路径后接反斜杠\这就是您发现错误的原因。