Installing pytorch Windwos 8.1 [Win Error 2]

System Specification:

  1. cuda 10.
  2. Visual Studio 15.9.2
  3. Windows 8.1.

I used the following commands in installation from pytorch website and there’s a screen shot of the error.

set CMAKE_GENERATOR=Visual Studio 15 2017 Win64
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 
python install


Hi alban,
do you have any solution for my problem?
The file is actually in the file system, I used the correct path?
I have installed cuda 10, that’s why I am installing from source, if that didn’t work for me and I installed pytorch without gpu using binaries, could I upgrade the installation to use gpu after cuda 10 support for binaries released or will I uninstall and reinstall pytorch from scratch?


I’m afraid i’m not familiar with windows build.
It seems that your visual studio acript call fails no? It says that the command was too long.
Did you initialized all the submodules properly for pytorch as well?

I resolved that visual studio script, but still the installation doesn’t work using

python install

I attached a screenshot after visual studio is initialized successfully for x64 system.
If you can refer to someone who is familiar with windows build, it will be very helpful.
Thanks a lot for your reply!


@peterjc123 might be able to help.

1 Like

Is your PyTorch clone complete? Is build_pytorch_libs.bat in the directory tools under PyTorch root directory?

1 Like

No just “”. The ‘.bat’ doesn’t exist. So the not file is actually referring to “build_pytorch_libs.bat” not the file. I checked the setup file and found the library build function loop, that’s very cool way to debug installation, but the system didn’t specify the ‘not-found’ file. I think I shall contact windows support.
Special Thanks!