Info: I am using Windows 10 with python 3.7.7 and pip 19.2.3
Problem: I was trying to install nes-py in cmd prompt using
pip install nes-py, but during the
Building wheel for nes-py (setup.py) ... error stage of the install I got the following error:
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\include\yvals.h(12): fatal error C1083: Cannot open include file: 'crtdbg.h': No such file or directory error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.25.28610\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2 ---------------------------------------- ERROR: Failed building wheel for nes-py
Edit: I copy and pasted over many files from the Windows SDK and now have a new error:
Generating code Finished generating code LINK : fatal error LNK1158: cannot run 'rc.exe' error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.26.28801\\bin\\HostX86\\x64\\link.exe' failed with exit status 1158 ---------------------------------------- ERROR: Failed building wheel for nes-py
crtdbg.his a header file from Windows SDK. developercommunity.visualstudio.com/content/problem/958134/…
C:\Program Files (x86)\Windows Kitsbut the error still persisted. The missing file was in the Windows Kits folder though so I copy and pasted it over to `C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\include`. The error then disappeared but I got a new one for a different file. So I then copy and pasted over the entire include folder and lib folder. This made a lot of errors disappear but I got another one which I do not know what to do about. I have added the error message to the question.
I solved this issue by installing node.js. This installed all the needed files for me and allowed me to install any packages that had a wheel. This isn't a very elegant fix since it also installed many files that I do not need, but it seems to work and is very simple.
I only solved this issue by installing Visual Studio Community (I had Visual Studio Code).
I did this following the comment here about the requirements to install py-nes that are already inside Visual Studio Community.
Try with completely new enviorment using conda
create -n your_env_name python=3.7. I have created with python 3.7. It resolves the issue.
You just download and install this program and run the command again https://visualstudio.microsoft.com/visual-cpp-build-tools/
I can solve the problem - install SDK for Windows 10 screenshot