I just downloaded SublimeText 3, because I wanted something faster to run code than 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
.
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.
Here is the complete diagnostic SublimeText sent to me. The code I'm running just prints "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 !
My COMSPEC
environment variable was badly set up. 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
.