obendidi / Tracking-with-darkflow

Real-time people Multitracker using YOLO v2 and deep_sort with tensorflow
GNU General Public License v3.0
523 stars 174 forks source link

Building module darkflow.darkflow.cython_utils.cy_yolo_findboxes failed #54

Open tonmoyborah opened 6 years ago

tonmoyborah commented 6 years ago

I have installed cython using pip and still have this error when I run run.py. I think I have all the dependencies in place and have step by step instructions you provided. Any idea why this error pops? I am using python2.7, tf 1.2, cython 0.28

tonmoyborah commented 6 years ago

Is it necessary to use python3 for this. Is there any way to use python2.7? The full error stack is -

python run.py /home/tonmoy/.local/lib/python2.7/site-packages/requests/init.py:80: RequestsDependencyWarning: urllib3 (1.22) or chardet (2.3.0) doesn't match a supported version! RequestsDependencyWarning) /home/tonmoy/.pyxbld/temp.linux-x86_64-2.7/pyrex/darkflow/darkflow/cython_utils/cy_yolo_findboxes.c:242:31: fatal error: numpy/arrayobject.h: No such file or directory compilation terminated. Traceback (most recent call last): File "run.py", line 3, in from darkflow.darkflow.net.build import TFNet File "/home/tonmoy/ML/Tracking-with-darkflow/darkflow/darkflow/net/build.py", line 7, in from .framework import create_framework File "/home/tonmoy/ML/Tracking-with-darkflow/darkflow/darkflow/net/framework.py", line 1, in from . import yolo File "/home/tonmoy/ML/Tracking-with-darkflow/darkflow/darkflow/net/yolo/init.py", line 2, in from . import predict File "/home/tonmoy/ML/Tracking-with-darkflow/darkflow/darkflow/net/yolo/predict.py", line 9, in from ...cython_utils.cy_yolo_findboxes import yolo_box_constructor File "/usr/lib/python2.7/dist-packages/pyximport/pyximport.py", line 435, in load_module language_level=self.language_level) File "/usr/lib/python2.7/dist-packages/pyximport/pyximport.py", line 227, in load_module exec("raise exc, None, tb", {'exc': exc, 'tb': tb}) File "/usr/lib/python2.7/dist-packages/pyximport/pyximport.py", line 209, in load_module inplace=build_inplace, language_level=language_level) File "/usr/lib/python2.7/dist-packages/pyximport/pyximport.py", line 186, in build_module reload_support=pyxargs.reload_support) File "/usr/lib/python2.7/dist-packages/pyximport/pyxbuild.py", line 100, in pyx_to_dll dist.run_commands() File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/lib/python2.7/dist-packages/Cython/Distutils/build_ext.py", line 164, in run _build_ext.build_ext.run(self) File "/usr/lib/python2.7/distutils/command/build_ext.py", line 339, in run self.build_extensions() File "/usr/lib/python2.7/dist-packages/Cython/Distutils/build_ext.py", line 172, in build_extensions self.build_extension(ext) File "/usr/lib/python2.7/distutils/command/build_ext.py", line 498, in build_extension depends=ext.depends) File "/usr/lib/python2.7/distutils/ccompiler.py", line 574, in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) File "/usr/lib/python2.7/distutils/unixccompiler.py", line 124, in _compile raise CompileError, msg ImportError: Building module darkflow.darkflow.cython_utils.cy_yolo_findboxes failed: ["CompileError: command 'x86_64-linux-gnu-gcc' failed with exit status 1\n"]

ahkarami commented 6 years ago

Dear @tonmoyborah, I have also faced your problem. I have used TensorFlow 1.7 (GPU Based), Python 3.5, (CUDA 9.0 & cuDNN 7) and all packages installed via pip3 install.

ahkarami commented 6 years ago

Related Links: 1- No module named cy_yolo_findboxes 2- Link2 3- Link3

tonmoyborah commented 6 years ago

@ahkarami your problem would be mainly because of your Cython imo. Cython has this issue of having different versions for different versions of python. So I think you should verify your cython. First step would be to try to import cython in a python 3.5 env.

ahkarami commented 6 years ago

I can use & import cython in python3. however the above-mentioned problem is remained.

Yolymaker commented 6 years ago

I have also faced your problem. C:\Users\Admin.pyxbld\temp.win-amd64-3.5\Release\pyrex\darkflow\darkflow\cython_utils\cy_yolo_findboxes.c(435): fatal error C1083: Cannot open include file: 'numpy/arrayobject.h': No such file or directory I don't know how to solve.

tonmoyborah commented 6 years ago

@AlexMistletoe your issue might be a little different. Try copying cython_utils folder from inside darkflow directory i.e. /Tracking-with-darkflow/darkflow/cython_utils to /Tracking-with-darkflow/cython_utils

Yolymaker commented 6 years ago

@tonmoyborah Thanks,but the problem now is:ImportError: No module named 'darkflow.darkflow.cython_utils.cy_yolo_findboxes' when I run the run.py

me6ran commented 6 years ago

I got the same error as below, when I run ./flow --h

ImportError: No module named cy_yolo_findboxes I can import cython without any problem in my python code:

import cython cython.version

any idea?

sergionegri commented 5 years ago

I have also faced your problem. C:\Users\Admin.pyxbld\temp.win-amd64-3.5\Release\pyrex\darkflow\darkflow\cython_utils\cy_yolo_findboxes.c(435): fatal error C1083: Cannot open include file: 'numpy/arrayobject.h': No such file or directory I don't know how to solve.

Exactly my same error. I tried to follow @tonmoyborah 's suggestion but the problem persist. I was hoping to move to the following error :( . Any clue? BTW I did not have cython_utils inside /Tracking-with-darkflow/darkflow/ but inside /Tracking-with-darkflow/darkflow/darkflow/. I tried to move it both to /Tracking-with-darkflow/darkflow/ and to /Tracking-with-darkflow/ as suggested, to no avail

tchuang96224 commented 5 years ago

I faced this error, ImportError: Building module darkflow.cython_utils.nms failed: ["distutils.errors.CompileError: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2\n"] and I have no idea how to solve it. Anyone can help?

buzdarbalooch commented 5 years ago

@tonmoyborah i am also using python 2.7 facing the same problem. By chance were u able to resolve this issue.

Sha-Shak commented 4 years ago

did anyone solved this issue? I am having the exact same issue if any of you have solved it could you please tell me how to fix it?

Edvard88 commented 4 years ago

Anybody solved this problem?