pytorch>python setup.py install
Building wheel torch-1.6.0a0+f41742f
– Building version 1.6.0a0+f41742f
cmake -GNinja -DBUILD_PYTHON=True -DBUILD_TEST=True -DCMAKE_BUILD_TYPE=Release -DCMAKE_GENERATOR=Visual Studio 15 2017 -DCMAKE_GENERATOR_TOOLSET_VERSION=14.11 -DCMAKE_INSTALL_PREFIX=C:\Users\M-El Behery\pytorch\torch -DCMAKE_PREFIX_PATH=C:\Users\M-El Behery\anaconda3\Lib\site-packages -DNUMPY_INCLUDE_DIR=C:\Users\M-El Behery\anaconda3\lib\site-packages\numpy\core\include -DPYTHON_EXECUTABLE=C:\Users\M-El Behery\anaconda3\python.exe -DPYTHON_INCLUDE_DIR=C:\Users\M-El Behery\anaconda3\include -DPYTHON_LIBRARY=C:\Users\M-El Behery\anaconda3/libs/python37.lib -DTORCH_BUILD_VERSION=1.6.0a0+f41742f -DUSE_NUMPY=True C:\Users\M-El Behery\pytorch
CMake Error: Error: generator : Ninja
Does not match the generator used previously: Visual Studio 15 2017
Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.
Traceback (most recent call last):
File “setup.py”, line 739, in 
build_deps()
File “setup.py”, line 321, in build_deps
cmake=cmake)
File “C:\Users\M-El Behery\pytorch\tools\build_pytorch_libs.py”, line 59, in build_caffe2
rerun_cmake)
File “C:\Users\M-El Behery\pytorch\tools\setup_helpers\cmake.py”, line 324, in generate
self.run(args, env=my_env)
File “C:\Users\M-El Behery\pytorch\tools\setup_helpers\cmake.py”, line 141, in run
check_call(command, cwd=self.build_dir, env=env)
File “C:\Users\M-El Behery\anaconda3\lib\subprocess.py”, line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘cmake’, ‘-GNinja’, ‘-DBUILD_PYTHON=True’, ‘-DBUILD_TEST=True’, ‘-DCMAKE_BUILD_TYPE=Release’, ‘-DCMAKE_GENERATOR=Visual Studio 15 2017’, ‘-DCMAKE_GENERATOR_TOOLSET_VERSION=14.11’, ‘-DCMAKE_INSTALL_PREFIX=C:\Users\M-El Behery\pytorch\torch’, ‘-DCMAKE_PREFIX_PATH=C:\Users\M-El Behery\anaconda3\Lib\site-packages’, ‘-DNUMPY_INCLUDE_DIR=C:\Users\M-El Behery\anaconda3\lib\site-packages\numpy\core\include’, ‘-DPYTHON_EXECUTABLE=C:\Users\M-El Behery\anaconda3\python.exe’, ‘-DPYTHON_INCLUDE_DIR=C:\Users\M-El Behery\anaconda3\include’, ‘-DPYTHON_LIBRARY=C:\Users\M-El Behery\anaconda3/libs/python37.lib’, ‘-DTORCH_BUILD_VERSION=1.6.0a0+f41742f’, ‘-DUSE_NUMPY=True’, ‘C:\Users\M-El Behery\pytorch’]’ returned non-zero exit status 1.
this is the message showed after running python setup.py install