Sublime Forum

Help, [Errno 2] No such file or directory

#1

Hi,

I’m trying to run a simple program but I keep getting this:

python: can’t open file ‘C:\Program Files (x86)\Sublime Text 3\intro.py’: [Errno 2] No such file or directory
[Finished in 0.1s with exit code 2]
[shell_cmd: python -u “C:\Program Files (x86)\Sublime Text 3\intro.py”]
[dir: C:\Program Files (x86)\Sublime Text 3]
[path: C:\Python\Python390\Scripts;C:\Python\Python390;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Users\Christopher\AppData\Local\Programs\Python\Python39\Scripts;C:\Users\Christopher\AppData\Local\Programs\Python\Python39;C:\Users\Christopher\AppData\Local\Microsoft\WindowsApps;C:\Users\Christopher\AppData\Local\atom\bin]

Hope one of you can help,
Thanks

0 Likes

#2

I would try moving your Python file to a folder in your Documents directory or your desktop, etc.

Windows blocks casual file access to locations inside of Program Files to stop programs from potentially breaching your security, since if they can read and write to files there they can replace your applications or configuration without your knowing about it.

0 Likes