信息:我使用的是带有 python 3.7.7 和 pip 19.2.3 的 Windows 10
问题:我尝试使用pip install nes-py
在cmd提示符下安装nes-py,但是在Buildingwheel for nes-py期间( setup.py) ... 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
编辑:我从 Windows SDK 复制并粘贴了许多文件,现在出现了一个新错误:
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
最佳答案
我通过安装 node.js 解决了这个问题。这为我安装了所有需要的文件,并允许我安装任何有轮子的软件包。这不是一个非常优雅的修复,因为它还安装了许多我不需要的文件,但它似乎有效并且非常简单。
关于python - nes-py 构建轮子失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62620393/