zoukankan      html  css  js  c++  java
  • python各种包安装bug汇总

    pip install pydensecrf

    环境为python3.7.7+Ubuntu16.04,部分报错信息如下

    ERROR: Command errored out with exit status 1:
    pydensecrf/eigen.cpp: In function ‘void __Pyx__ExceptionSave(PyThreadState*, PyObject**, PyObject**, PyObject**)’:
    pydensecrf/eigen.cpp:17032:21: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
    *type = tstate->exc_type;
    ^
    {aka struct _ts}’ has no member named ‘exc_value’te
    *value = tstate->exc_value;
    ^
    pydensecrf/eigen.cpp:17034:19: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
    *tb = tstate->exc_traceback;
    ^
    pydensecrf/eigen.cpp: In function ‘void __Pyx__ExceptionReset(PyThreadState*, PyObject*, PyObject*, PyObject*)’:
    pydensecrf/eigen.cpp:17041:24: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
    tmp_type = tstate->exc_type;
    ^
    pydensecrf/eigen.cpp:17042:25: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
    tmp_value = tstate->exc_value;
    ^
    pydensecrf/eigen.cpp:17043:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
    tmp_tb = tstate->exc_traceback;
    ^
    pydensecrf/eigen.cpp:17044:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
    tstate->exc_type = type;
    ^
    pydensecrf/eigen.cpp:17045:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
    tstate->exc_value = value;
    ^
    pydensecrf/eigen.cpp:17046:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
    tstate->exc_traceback = tb;
    ^
    pydensecrf/eigen.cpp: In functionint __Pyx__GetException(PyThreadState*, PyObject**, PyObject**, PyObject**)’:
    pydensecrf/eigen.cpp:17101:24: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
    tmp_type = tstate->exc_type;
    ^
    pydensecrf/eigen.cpp:17102:25: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
    tmp_value = tstate->exc_value;
    ^
    pydensecrf/eigen.cpp:17103:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
    tmp_tb = tstate->exc_traceback;
    ^
    pydensecrf/eigen.cpp:17104:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
    tstate->exc_type = local_type;
    ^
    pydensecrf/eigen.cpp:17105:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
    tstate->exc_value = local_value;
    ^
    pydensecrf/eigen.cpp:17106:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
    tstate->exc_traceback = local_tb;
    ^
    pydensecrf/eigen.cpp: In function ‘void __Pyx__ExceptionSwap(PyThreadState*, PyObject**, PyObject**, PyObject**)’:
    pydensecrf/eigen.cpp:17128:24: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
    tmp_type = tstate->exc_type;
    ^
    pydensecrf/eigen.cpp:17129:25: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
    tmp_value = tstate->exc_value;
    ^
    pydensecrf/eigen.cpp:17130:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
    tmp_tb = tstate->exc_traceback;
    ^
    pydensecrf/eigen.cpp:17131:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
    tstate->exc_type = *type;
    ^
    pydensecrf/eigen.cpp:17132:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
    tstate->exc_value = *value;
    ^
    pydensecrf/eigen.cpp:17133:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
    tstate->exc_traceback = *tb;
    ^

    解决方案:

    1. 网上查找到的方案多为:该报错是因为未安装cython,因此使用pip install cython(本次报错实际已经安装cython,因此继续纠错)
    2. 据说用conda安装不会报错,即:conda install -c conda-forge pydensecrf(本次环境中未安装conda,不考虑此方案)
    3. 使用git直接安装最近版本,最终未报错,即:pip install git+https://github.com/lucasb-eyer/pydensecrf.git
  • 相关阅读:
    二维数组问题
    如何在Windows环境下寻找并杀死进程
    关于使用YYYY-MM-dd产生BUG的问题
    boolean在Java中占几个字节的问题
    IDEA启动项目时报错:Error running 'Application': Command line is too long. Shorten command line for Application or also for Spring Boot default configuration.
    mvn package失败,不再支持源选项 1.5。请使用 1.6 或更高版本。
    17蓝桥杯竞赛题“购物单”
    17蓝桥杯竞赛题“取数位”
    微信公众平台开发(ASP.NET)
    宋艳杰个人作品集合
  • 原文地址:https://www.cnblogs.com/Xiaoyan-Li/p/14971984.html
Copyright © 2011-2022 走看看