[英]Can't Open File [Errno 2 ] No such file or directory
I am new to coding and trying to run a python code in vscode using code runner but it doesn't work, I think the issue is that code runner runs C:\/c\/-------- which doesn't exist in my directory, but I don't know how to go about solving it.我是编码新手并尝试使用代码运行器在 vscode 中运行 python 代码,但它不起作用,我认为问题是代码运行器运行 C:\/c\/-------- 这不是存在于我的目录中,但我不知道如何解决它。 screenshot of terminal when I try to run<\/a>
我尝试运行时的终端屏幕截图<\/a>
PS C:\Users\Kevin> python -u "/c/Users/Kevin/Desktop/Coding/Python/testing/hello.py"
C:\Python\Python39\python.exe: can't open file 'C:\c\Users\Kevin\Desktop\Coding\Python\testing\hello.py': [Errno 2] No such file or directory
How do you run your python file with Code Runner<\/code> ?
你如何使用
Code Runner<\/code>运行你的 python 文件?
Normally, it should be like this:通常,它应该是这样的:
Do you click here to run the python file?你点击这里运行python文件吗?
"
您可以尝试进入代码运行器设置(@ext:formulahendry.code-runner),打开代码运行器:执行器映射,在 Json 中编辑,然后将“code-runner.terminalRoot”值更改为“”,然后返回设置并取消标记在终端中运行框。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.