Pydensecrf 安装报错

环境:python3.7.3/spyder/win10

全连接条件随机场安装出错。

错误如下:

Installing collected packages: pydensecrf
    Running setup.py install for pydensecrf ... error
    ERROR: Command errored out with exit status 1:
     command: 'd:\spyder\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Public\\Documents\\Wondershare\\CreatorTemp\\pip-install-nkyl7o7c\\pydensecrf\\setup.py'"'"'; __file__='"'"'C:\\Users\\Public\\Documents\\Wondershare\\CreatorTemp\\pip-install-nkyl7o7c\\pydensecrf\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-record-_359sji2\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\spyder\Include\pydensecrf'
         cwd: C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-nkyl7o7c\pydensecrf\
    Complete output (58 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.7
    creating build\lib.win-amd64-3.7\pydensecrf
    copying pydensecrf\utils.py -> build\lib.win-amd64-3.7\pydensecrf
    copying pydensecrf\__init__.py -> build\lib.win-amd64-3.7\pydensecrf
    running build_ext
    building 'pydensecrf.eigen' extension
    creating build\temp.win-amd64-3.7
    creating build\temp.win-amd64-3.7\Release
    creating build\temp.win-amd64-3.7\Release\pydensecrf
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ipydensecrf/densecrf/include -Ipydensecrf -Id:\spyder\include -Id:\spyder\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /EHsc /Tppydensecrf/eigen.cpp /Fobuild\temp.win-amd64-3.7\Release\pydensecrf/eigen.obj
    eigen.cpp
    pydensecrf/eigen.cpp(17032): error C2039: 'exc_type': is not a member of '_ts'
    d:\spyder\include\pystate.h(212): note: see declaration of '_ts'
    pydensecrf/eigen.cpp(17033): error C2039: 'exc_value': is not a member of '_ts'
    d:\spyder\include\pystate.h(212): note: see declaration of '_ts'
    pydensecrf/eigen.cpp(17034): error C2039: 'exc_traceback': is not a member of '_ts'
    d:\spyder\include\pystate.h(212): note: see declaration of '_ts'
    pydensecrf/eigen.cpp(17041): error C2039: 'exc_type': is not a member of '_ts'
    d:\spyder\include\pystate.h(212): note: see declaration of '_ts'
    pydensecrf/eigen.cpp(17042): error C2039: 'exc_value': is not a member of '_ts'
    d:\spyder\include\pystate.h(212): note: see declaration of '_ts'
    pydensecrf/eigen.cpp(17043): error C2039: 'exc_traceback': is not a member of '_ts'
    d:\spyder\include\pystate.h(212): note: see declaration of '_ts'
    pydensecrf/eigen.cpp(17044): error C2039: 'exc_type': is not a member of '_ts'
    d:\spyder\include\pystate.h(212): note: see declaration of '_ts'
    pydensecrf/eigen.cpp(17045): error C2039: 'exc_value': is not a member of '_ts'
    d:\spyder\include\pystate.h(212): note: see declaration of '_ts'
    pydensecrf/eigen.cpp(17046): error C2039: 'exc_traceback': is not a member of '_ts'
    d:\spyder\include\pystate.h(212): note: see declaration of '_ts'
    pydensecrf/eigen.cpp(17101): error C2039: 'exc_type': is not a member of '_ts'
    d:\spyder\include\pystate.h(212): note: see declaration of '_ts'
    pydensecrf/eigen.cpp(17102): error C2039: 'exc_value': is not a member of '_ts'
    d:\spyder\include\pystate.h(212): note: see declaration of '_ts'
    pydensecrf/eigen.cpp(17103): error C2039: 'exc_traceback': is not a member of '_ts'
    d:\spyder\include\pystate.h(212): note: see declaration of '_ts'
    pydensecrf/eigen.cpp(17104): error C2039: 'exc_type': is not a member of '_ts'
    d:\spyder\include\pystate.h(212): note: see declaration of '_ts'
    pydensecrf/eigen.cpp(17105): error C2039: 'exc_value': is not a member of '_ts'
    d:\spyder\include\pystate.h(212): note: see declaration of '_ts'
    pydensecrf/eigen.cpp(17106): error C2039: 'exc_traceback': is not a member of '_ts'
    d:\spyder\include\pystate.h(212): note: see declaration of '_ts'
    pydensecrf/eigen.cpp(17128): error C2039: 'exc_type': is not a member of '_ts'
    d:\spyder\include\pystate.h(212): note: see declaration of '_ts'
    pydensecrf/eigen.cpp(17129): error C2039: 'exc_value': is not a member of '_ts'
    d:\spyder\include\pystate.h(212): note: see declaration of '_ts'
    pydensecrf/eigen.cpp(17130): error C2039: 'exc_traceback': is not a member of '_ts'
    d:\spyder\include\pystate.h(212): note: see declaration of '_ts'
    pydensecrf/eigen.cpp(17131): error C2039: 'exc_type': is not a member of '_ts'
    d:\spyder\include\pystate.h(212): note: see declaration of '_ts'
    pydensecrf/eigen.cpp(17132): error C2039: 'exc_value': is not a member of '_ts'
    d:\spyder\include\pystate.h(212): note: see declaration of '_ts'
    pydensecrf/eigen.cpp(17133): error C2039: 'exc_traceback': is not a member of '_ts'
    d:\spyder\include\pystate.h(212): note: see declaration of '_ts'
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'd:\spyder\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Public\\Documents\\Wondershare\\CreatorTemp\\pip-install-nkyl7o7c\\pydensecrf\\setup.py'"'"'; __file__='"'"'C:\\Users\\Public\\Documents\\Wondershare\\CreatorTemp\\pip-install-nkyl7o7c\\pydensecrf\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-record-_359sji2\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\spyder\Include\pydensecrf' Check the logs for full command output.

指令记录:

第一步:https://www.lfd.uci.edu/~gohlke/pythonlibs/#pydensecrf    中下载对应版本的.whl

第二步:放到某个路径下,然后复制路径。例如:D:/pyeda-0.28.0-cp37-cp37m-win_amd64.whl

第三步:cmd运行:pip install D:/pyeda-0.28.0-cp37-cp37m-win_amd64.whl(刚刚复制的路径)

第四步:搞定。

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

_文和_

感觉对您有用,可以来点鼓励!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值