简体   繁体   English

无法打开文件'/c':[Errno 2] 没有这样的文件或目录

[英]can't open file '/c': [Errno 2] No such file or directory

I just downloaded SublimeText 3, because I wanted something faster to run code than PyCharm.我刚刚下载了 SublimeText 3,因为我想要比 PyCharm 更快的代码运行速度。 And every time I try to run something I get the same Error: can't open file '/c': [Errno 2] No such file or directory .每次我尝试运行某些东西时,我都会得到相同的 Error: can't open file '/c': [Errno 2] No such file or directory

And I don't understand why it doesn't work, the problem doesn't seem to be caused by permissions, and I think that my path is setup in a good way.而且我不明白为什么它不起作用,问题似乎不是由权限引起的,而且我认为我的路径设置得很好。 So here I am, I hope someone can help me.所以我在这里,我希望有人可以帮助我。

Edit: I'm on Windows 10 and haven't changed or created any file in SublimeText folders.编辑:我在 Windows 10 上,没有在 SublimeText 文件夹中更改或创建任何文件。

Here is the complete diagnostic SublimeText sent to me.这是发送给我的完整诊断 SublimeText。 The code I'm running just prints "Hello World".我正在运行的代码只打印“Hello World”。 (and I don't wan't to show my name, so I replaced it by the word "User" instead): (而且我不想显示我的名字,所以我用“用户”这个词代替了它):

C:\Program Files (x86)\Python38-32\python.exe: can't open file '/c': [Errno 2] No such file or directory
[Finished in 0.3s with exit code 2]
[shell_cmd: python -u "D:\Users\User\Documents\Python\test.py"]
[dir: D:\Users\User\Documents\Python]
[path: C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\TXE Components\iCLS\;C:\Program Files\Intel\TXE Components\iCLS\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Intel\TXE Components\DAL\;C:\Program Files (x86)\Intel\TXE Components\DAL\;C:\Program Files\Intel\TXE Components\IPT\;C:\Program Files (x86)\Intel\TXE Components\IPT\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Brackets\command;C:\Program Files (x86)\Python38-32\;C:\Program Files (x86)\Python38-32\Scripts\;C:\Users\User\AppData\Local\Microsoft\WindowsApps;C:\Program Files\JetBrains\PyCharm Community Edition 2020.1.2\bin;;]

Thanks.谢谢。

I found how to resolve it thanks to @OdatNurd !感谢@OdatNurd,我找到了解决方法!

My COMSPEC environment variable was badly set up.我的COMSPEC环境变量设置不当。 I don't know why but mine was pointing python.exe and I could make it work by changing it to the path of cmd.exe .我不知道为什么,但我的指向python.exe ,我可以通过将其更改为cmd.exe的路径来使其工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 python:无法打开文件“C:\\Program”:[Errno 2] 没有这样的文件或目录 - python: can't open file 'C:\Program': [Errno 2] No such file or directory 无法打开文件:[Errno 2] 没有那个文件或目录 - can't open file : [Errno 2] No such file or directory 无法打开文件:[Errno 2] 没有那个文件或目录 - can't open file : [Errno 2] No such file or directory 无法打开文件 [Errno 2] 没有这样的文件或目录 - Can't Open File [Errno 2 ] No such file or directory 无法打开文件'file.py':[Errno 2] 没有这样的文件或目录 - Can't open file 'file.py': [Errno 2] No such file or directory python:无法打开文件“帮助”:[Errno 2]没有此类文件或目录 - python: can't open file 'help': [Errno 2] No such file or directory 无法打开文件'menu.py':[Errno 2]没有这样的文件或目录 - Can't open file 'menu.py': [Errno 2] No such file or directory 无法打开文件'.manage.py':[Errno 2] 没有这样的文件或目录 - can't open file '.manage.py': [Errno 2] No such file or directory 无法打开文件“audioAnalysis.py”:[Errno 2] 没有这样的文件或目录 - Can't open file 'audioAnalysis.py': [Errno 2] No such file or directory 无法打开文件 'app.py': [Errno 2] 没有那个文件或目录 - can't open file 'app.py': [Errno 2] No such file or directory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM