Sublime Forum

Win error 2

#1

[WinError 2] The system cannot find the file specified
[cmd: [‘py’, ‘-u’, ‘C:\Users\Hp\Downloads\php-spms\php-spms\we.py’]]
[dir: C:\Users\Hp\Downloads\php-spms\php-spms]
[path: C:\Program Files\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Users\Hp\AppData\Local\Microsoft\WindowsApps;C:\Users\Hp\AppData\Local\Programs\Microsoft VS Code\bin]
[Finished]

Guys help me out here

0 Likes

#2

image

0 Likes

#3

I would guess

  • either Python is not installed
  • or not installed via the official installer (https://www.python.org/downloads/windows/) but via WindowsApps (since it appears in your PATH). If python is available but py isn’t, then it’s most likely the latter case.

thus, py is not available.

2 Likes

#4

After downloading python installer and installing it, this is what it displays.

0 Likes

#5

The file has been deleted - as indicated by the red dot next to the file name. Your file needs to be saved before python can run it.

1 Like

#6

Thanks got it.
What about this ?

0 Likes

#7

Not sure why the PHP script is executed via Python.
Since there is image , I would guess you are using your own build system.

0 Likes

#8

no not via python, I just wrote a php code in sublime text then after running it , that is the output

0 Likes

#9

I bet it was executed via Python when ST runs it.

0 Likes

#10

does sublime text has a php build system or I need to install php first?

0 Likes

#11

No. https://github.com/sublimehq/Packages/tree/master/PHP

But it’s pretty easy to create one. E.g., https://github.com/jfcherng-sublime/ST-my-settings/blob/09d45491528c84882464a3de6157c7d512a06f56/Packages/PHP/PHP.sublime-build

There should be a builtin one honestly.

Yes, all build systems are just calling external programs for you. They don’t do any actual work.


But the real issue is: Why Python is used to execute a PHP script. Is that even possible without any customization? And thus I doubt this is caused by a custom build system.

0 Likes

#12

what should I do about it?

0 Likes

#13

the python code is executing well now but the php code doesnt run and I cant find php build system

0 Likes