ImportError:构建模块darkflow.cython_utils.cy_yolo_findboxes

时间:2018-06-21 16:04:31

标签: python darkflow

我一直在使用该Darkflow Tracker,网址为: https://github.com/thtrieu/darkflow 它一直在工作,我已经对其进行了一些实验。

最近,我已经编写了一些包装程序和其他软件包以将其与另一个应用程序集成,并且我开始遇到以下错误:

ImportError: Building module darkflow.cython_utils.cy_yolo_findboxes failed: ["AttributeError: 'module' object has no attribute '__pyx_capi__'\n"]

现在,奇怪的是,像我以前使用它一样,我什至无法将其作为独立模块单独运行。我曾尝试在各种论坛上寻找此问题,但显然没有其他人以前遇到过此问题。我什至尝试了Darkflow的全新克隆以及所有的构建过程,但是我仍然遇到相同的错误,这可能表明某些错误不在系统范围内,但是我无法弄清楚。

这是问题的全部痕迹:

Traceback (most recent call last):
  File "./flow", line 4, in <module>
    from darkflow.cli import cliHandler
  File "/home/Test_Darkflow/Tracking-with-darkflow/darkflow/darkflow/cli.py", line 3, in <module>
    from .net.build import TFNet
  File "/home/Test_Darkflow/Tracking-with-darkflow/darkflow/darkflow/net/build.py", line 7, in <module>
    from .framework import create_framework
  File "/home/Test_Darkflow/Tracking-with-darkflow/darkflow/darkflow/net/framework.py", line 1, in <module>
    from . import yolo
  File "/home/Test_Darkflow/Tracking-with-darkflow/darkflow/darkflow/net/yolo/__init__.py", line 2, in <module>
    from . import predict
  File "/home/Test_Darkflow/Tracking-with-darkflow/darkflow/darkflow/net/yolo/predict.py", line 9, in <module>
    from ...cython_utils.cy_yolo_findboxes import yolo_box_constructor
  File "/usr/local/lib/python2.7/dist-packages/pyximport/pyximport.py", line 458, in load_module
language_level=self.language_level)
  File "/usr/local/lib/python2.7/dist-packages/pyximport/pyximport.py", line 233, in load_module
exec("raise exc, None, tb", {'exc': exc, 'tb': tb})
  File "/usr/local/lib/python2.7/dist-packages/pyximport/pyximport.py", line 216, in load_module
    mod = imp.load_dynamic(name, so_path)
  File "darkflow/cython_utils/cy_yolo_findboxes.pyx", line 1, in init darkflow.cython_utils.cy_yolo_findboxes
    import numpy as np

ImportError: Building module darkflow.cython_utils.cy_yolo_findboxes failed: ["AttributeError: 'module' object has no attribute '__pyx_capi__'\n"]

运行:

./flow

这将调用演示框架。

问题是在cython生成的C文件的以下行中出现的,

darkflow / darkflow / cython_utils / cy_yolo_findboxes.c:

d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");

我尝试用python2和python3构建它。 我已经检查了.so文件,它们都已被创建并且在预期的路径上。 我什至尝试重新安装cython。 我已经在各个论坛上查看了所有相关问题,但找不到解决方案或此特定问题的根本原因。

我已经没有其他选择了,如果有人可以提供帮助,我们将不胜感激。谢谢。

0 个答案:

没有答案