Running Cython in Windows x64 - fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory

前端 未结 5 1425
予麋鹿
予麋鹿 2020-11-29 04:19

I have been trying to install Cython for Python 2.7 on my Window 7 system. In particular, I prefer everything in 64 bits. (In case you wonder, I need Cython because Cython i

5条回答
  •  一整个雨季
    2020-11-29 04:32

    For those with Windows 10, download the SDK from here to fix the header file basestd.h.

    I downloaded the .exe, installed and worked great. SDK was ~2.3GB.

    Note: For those like me with 64-bit systems who got an additional error:

    `LINK : fatal error LNK1158: cannot run 'rc.exe'
        error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\link.exe' failed with exit status 1158
    

    There is a great answer here which solves the problem by placing the rc.exe file in the correct folder for your system.

提交回复
热议问题