Sublime Forum

Error when trying to build python code for first time

#1

Hello all,
I am new to Sublime text, AI, and the coding world in general frankly. I am following along with a neural network from scratch video and am running into an issue right away with this. I’ve verified that python is installed and in my system path, made a python 3 sublime-build file which i will also include below, and am still getting the issue. Any insight is appreciated because both myself and Bard are stumped lol

Code in sublime editor:

inputs = [1.2, 5.1, 2.1]
weights = [3.1, 2.1, 8.7]
bias = 3

output = inputs[0]*weights[0] + inputs[1]*weights[1] + inputs[2]*weights[2] + bias
print(output)


Error:
[WinError 2] The system cannot find the file specified
[cmd: [‘py’, ‘-3’, ‘C:\Users\emsis\AppData\Roaming\Sublime Text 3\Packages\User\test inputs’]]
[dir: C:\Users\emsis\AppData\Roaming\Sublime Text 3\Packages\User]
[path: C:\Program Files (x86)\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:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\dotnet;C:\sqlite3;C:\Program Files\Git\cmd;C:\ProgramData\Anaconda3;C:\ProgramData\Anaconda3\Scripts;C:\Users\ProgramData\Anaconda3\Library\bin;C:\Users\emsis\AppData\Local\Microsoft\WindowsApps;C:\Users\emsis\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\emsis\AppData\Local\Programs\MiKTeX\miktex\bin\x64;C:\ProgramData\Anaconda3\python.exe;C:\ProgramData\Anaconda3\Scripts;C:\Users\ProgramData\Anaconda3\Library\bin;C:\sqlite3;C:\Program Files\dotnet;C:\Program Files\Git\cmd;]
[Finished]


python 3.sublime-build:

{
“cmd”: [“py”, “-3”, “$file”],
“selector”: “source.python”
}

Cheers!

0 Likes

#2

Do you have Python installed? Specifically, the version of Python you can get from https://www.python.org/ is the one that the build system you have specified is, I think, the only version that comes with the py helper that finds and executes Python.

Your PATH in the diagnostic looks like it includes Anaconda, which I don’t think has the py helper, so your build should be trying to execute python and not py in order to execute, I would think.

1 Like

#3

Hey that was it! Nice! Thank you!!

1 Like