Getting File not found error while running setup.py file

Hi,

I am trying to setup the pytorch environment in my local machine and i have followed all the steps carefully but I am still getting the error below,

Traceback (most recent call last):
File “C:\Users\ishwa\Documents\Pytorch\pytorch_ij\setup.py”, line 1376, in
main()
File “C:\Users\ishwa\Documents\Pytorch\pytorch_ij\setup.py”, line 1092, in main
build_deps()
File “C:\Users\ishwa\Documents\Pytorch\pytorch_ij\setup.py”, line 464, in build_deps
build_caffe2(
File “C:\Users\ishwa\Documents\Pytorch\pytorch_ij\tools\build_pytorch_libs.py”, line 84, in build_caffe2
cmake.generate(
File “C:\Users\ishwa\Documents\Pytorch\pytorch_ij\tools\setup_helpers\cmake.py”, line 345, in generate
self.run(args, env=my_env)
File “C:\Users\ishwa\Documents\Pytorch\pytorch_ij\tools\setup_helpers\cmake.py”, line 97, in run
check_call(command, cwd=self.build_dir, env=env)
File “C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2032.0_x64__qbz5n2kfra8p0\Lib\subprocess.py”, line 408, in check_call
retcode = call(*popenargs, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2032.0_x64__qbz5n2kfra8p0\Lib\subprocess.py”, line 389, in call
with Popen(*popenargs, **kwargs) as p:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2032.0_x64__qbz5n2kfra8p0\Lib\subprocess.py”, line 1026, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File “C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2032.0_x64__qbz5n2kfra8p0\Lib\subprocess.py”, line 1538, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] The system cannot find the file specified

anyone knows how to deal with this?

I was able to solve above error after installing the vs build tools, but now I am getting another error after running the “python setup.py develop” command the error is as follows :-

C:\Users\ishwa\anaconda3\condabin\pytorch\third_party\pocketfft\pocketfft_hdronly.h(156): error C2039: ‘aligned_alloc’: is not a member of ‘`global namespace’’
[6472/7536] Building CXX object caffe2\CMakeFiles\torch_cpu.dir__\aten\src\ATen\native\mkldnn\ConvPrepack.cpp.obj
ninja: build stopped: subcommand failed.

can anyone please help me with this error.