python3 安装nltk 遇到 LINK : fatal error LNK1158: 无法运行“rc.exe”

  • windows10
  • python 3.5.2
  • 已安装Visual Studio C++ 14.0

在安装nltk的时候遇到如下报错:

LINK : fatal error LNK1158: 无法运行“rc.exe”
error: command ‘C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe’ failed with exit status 1158

完整报错截图:

python3 安装nltk 遇到 LINK : fatal error LNK1158: 无法运行“rc.exe”_第1张图片
python3 安装nltk 遇到 LINK : fatal error LNK1158: 无法运行“rc.exe”_第2张图片

后来在这里找到解决方案https://github.com/iMchxx/Blog/issues/27主要步骤如下图:

python3 安装nltk 遇到 LINK : fatal error LNK1158: 无法运行“rc.exe”_第3张图片

将rc.exe和rcdll.dll这两个文件移动到Microsoft Visual Studio 版本号\VC\bin就可以了。版本不用非得是11.0,我的路径就是14.0的
python3 安装nltk 遇到 LINK : fatal error LNK1158: 无法运行“rc.exe”_第4张图片

亲测可行。

你可能感兴趣的:(改bug,其他)