facebookresearch / Detectron

FAIR's research platform for object detection research, implementing popular algorithms like Mask R-CNN and RetinaNet.
Apache License 2.0
26.27k stars 5.45k forks source link

Makefile:17: recipe for target 'dev' failed #262

Open SophieZhou opened 6 years ago

SophieZhou commented 6 years ago

detectron/lib$ make python2 setup.py develop --user usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help

error: option --user not recognized Makefile:17: recipe for target 'dev' failed make: *** [dev] Error 1

caffe2 and cocoapi successfully installed yet. But when I make the lib file, it failed. I do not know how to deal with this problem.

ir413 commented 6 years ago

Hi @SophieZhou, please provide more information about your system and python setup.

In the meantime, you may also try running make install and python2 setup.py installl --user instead of make under detectron/lib.

SophieZhou commented 6 years ago

@ir413 Thanks very much for your reply. My system is ubuntu16.04, and I use Python with anaconda2. When I use make install and python2 setup.py install --user, it's always not ok. And the information is as follows.

~/detectron/lib$ make install python2 setup.py install running install running bdist_egg running egg_info writing Detectron.egg-info/PKG-INFO writing top-level names to Detectron.egg-info/top_level.txt writing dependency_links to Detectron.egg-info/dependency_links.txt reading manifest file 'Detectron.egg-info/SOURCES.txt' writing manifest file 'Detectron.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_ext building 'utils.cython_bbox' extension gcc -pthread -B /home/deep/anaconda2/compiler_compat -Wl,--sysroot=/ -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/deep/anaconda2/lib/python2.7/site-packages/numpy/core/include -I/home/deep/anaconda2/include/python2.7 -c utils/cython_bbox.c -o build/temp.linux-x86_64-2.7/utils/cython_bbox.o -Wno-cpp gcc: error: utils/cython_bbox.c: No such file or directory error: command 'gcc' failed with exit status 1 Makefile:9: recipe for target 'install' failed make: *** [install] Error 1

But when I used cython cython_bbox.pyx, it was wrong again.

~/detectron/lib/utils$ cython cython_bbox.pyx Traceback (most recent call last): File "/home/deep/anaconda2/bin/cython", line 7, in from Cython.Compiler.Main import setuptools_main File "/home/deep/anaconda2/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 10, in import io File "/home/deep/detectron/lib/utils/io.py", line 25, in import logging File "/home/deep/detectron/lib/utils/logging.py", line 23, in from collections import deque ImportError: cannot import name deque

gadcam commented 6 years ago

I suggest that you double check your installation of cython before anything else. The collections module does not seem well installed so that looks very bad. Moreover, I would not be surprise if the first error has the same root cause. (cf https://github.com/facebookresearch/Detectron/blob/master/lib/setup.py#L59)

Gpwner commented 6 years ago

when I run make ,I got the following: `python2 setup.py develop --user usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help

error: option --user not recognized Makefile:17: recipe for target 'dev' failed make: *** [dev] Error 1 When I run python2 setup.py install --user,I got the following running install Checking .pth file support in /home/xzchuang/.local/lib/python2.7/site-packages/ /usr/bin/python2 -E -c pass TEST PASSED: /home/xzchuang/.local/lib/python2.7/site-packages/ appears to support .pth files running bdist_egg running egg_info creating Detectron.egg-info writing Detectron.egg-info/PKG-INFO writing top-level names to Detectron.egg-info/top_level.txt writing dependency_links to Detectron.egg-info/dependency_links.txt writing manifest file 'Detectron.egg-info/SOURCES.txt' reading manifest file 'Detectron.egg-info/SOURCES.txt' writing manifest file 'Detectron.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_ext building 'utils.cython_bbox' extension creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/utils x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c utils/cython_bbox.c -o build/temp.linux-x86_64-2.7/utils/cython_bbox.o -Wno-cpp x86_64-linux-gnu-gcc: error: utils/cython_bbox.c: 没有那个文件或目录 x86_64-linux-gnu-gcc: fatal error: no input files compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1`

@ir413 how to fix it

Gpwner commented 6 years ago

@SophieZhou do you figure it out?