1. 程式人生 > >安裝Jpypel報錯 LINK : fatal error LNK1158: cannot run 'rc.exe'

安裝Jpypel報錯 LINK : fatal error LNK1158: cannot run 'rc.exe'

python3.6,vc14.0也已經安裝了,在pip install Jpyple的時候報錯:

jpype_python.obj : warning LNK4197: export 'PyInit__jpype' specified multiple times; using first specification
       Creating library build\temp.win-amd64-3.6\Release\native\common\_jpype.cp36-win_amd64.lib and object build\temp.win-amd64-3.6\Release\native\common\_jpype.cp36-win_amd64.exp
    Generating code
    Finished generating code
    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

解決辦法:

  1. 將其新增到PATH環境變數中:C:\Program Files (x86)\Windows Kits\10\bin\x64
  2. 複製這些檔案:rc.exe rcdll.dll

C:\Program Files (x86)\Windows Kits\8.1\bin\x86到C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin

(我只執行了第二步操作就已經安裝成功)