Python, installing clarifai --> VS14.0 link.exe failed with exit status 1158

廉价感情. 提交于 2019-11-28 07:25:02
joe

I had a similar problem today, and I solved it referring to

Visual Studio can't build due to rc.exe.

To fix the issue, do next steps:

  1. Add this to your PATH environment variables:

    C:\Program Files (x86)\Windows Kits\10\bin\x64

  2. Copy these files rc.exe & rcdll.dll from C:\Program Files (x86)\Windows Kits\8.1\bin\x86 to C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin

I had the very same problem when using PIP / Python 3.5 and Visual Studio 2017 while installing librosa using pip (and it's dependency resampy)

Solved the problem using the Visual Studio 2017 Developer prompt and running pip install from there.

Hope that helps someone.

In case this helps someone. The original problem didn't occur for me with a baseline VS2015. I now see the same problem with the LNK1158 error. I surmise because I'm now using VS2015 Update 2, which uses rc.exe from "C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64". The solution is similar to another answer. It is to either copy or take a symlink of rc.exe and rcdll.dll from:

    C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64

to

    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!