Build error

193 views
Skip to first unread message

Jean K

unread,
Oct 14, 2013, 9:38:35 AM10/14/13
to scikit...@googlegroups.com
Hi all,

I'm trying to build scikit-image locally, in my git folder, and to just add it to my PYTHONPATH.
I checked that all the requirements were met (confirmed by pip install -r requirements.txt).
However, when I do 
python setup.py build_ext -i 
I get an error.
I must be missing something but can't really figure out what...
 
This is the output I get:
non-existing path in 'skimage/_shared': 'tests'
non-existing path in 'skimage/_shared': 'geometry.c'
non-existing path in 'skimage/_shared': 'interpolation.c'
non-existing path in 'skimage/_shared': 'transform.c'
non-existing path in 'skimage/draw': '_draw.c'
non-existing path in 'skimage/feature': 'corner_cy.c'
non-existing path in 'skimage/feature': 'censure_cy.c'
non-existing path in 'skimage/feature': '_brief_cy.c'
non-existing path in 'skimage/feature': '_texture.c'
non-existing path in 'skimage/feature': '_template.c'
cython -o /homes/jk712/scikit-image/skimage/filter/_ctmf.c /homes/jk712/scikit-image/skimage/filter/_ctmf.pyx
Traceback (most recent call last):
  File "setup.py", line 146, in <module>
    cmdclass={'build_py': build_py},
  File "/usr/lib/python2.7/dist-packages/numpy/distutils/core.py", line 152, in setup
    config = configuration()
  File "setup.py", line 48, in configuration
    config.add_subpackage('skimage')
  File "/usr/lib/python2.7/dist-packages/numpy/distutils/misc_util.py", line 1003, in add_subpackage
    caller_level = 2)
  File "/usr/lib/python2.7/dist-packages/numpy/distutils/misc_util.py", line 972, in get_subpackage
    caller_level = caller_level + 1)
  File "/usr/lib/python2.7/dist-packages/numpy/distutils/misc_util.py", line 909, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
  File "skimage/setup.py", line 14, in configuration
    config.add_subpackage('filter')
  File "/usr/lib/python2.7/dist-packages/numpy/distutils/misc_util.py", line 1003, in add_subpackage
    caller_level = 2)
  File "/usr/lib/python2.7/dist-packages/numpy/distutils/misc_util.py", line 972, in get_subpackage
    caller_level = caller_level + 1)
  File "/usr/lib/python2.7/dist-packages/numpy/distutils/misc_util.py", line 909, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
  File "skimage/filter/setup.py", line 15, in configuration
    cython(['_ctmf.pyx'], working_path=base_path)
  File "/homes/jk712/scikit-image/skimage/_build.py", line 49, in cython
    subprocess.call(['cython', '-o', c_file, pyxfile])
  File "/usr/lib/python2.7/subprocess.py", line 524, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1308, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory


Apparently the problem would be coming from a missing file _template.c
 > /usr/lib/python2.7/subprocess.py(524)call()
    523     """
--> 524     return Popen(*popenargs, **kwargs).wait()
    525 
 
ipdb> print popenargs
(['cython', '-o', '/homes/jk712/scikit-image/skimage/feature/_template.c', '/homes/jk712/scikit-image/skimage/feature/_template.pyx'],)
 
ipdb> print kwargs
{}

On the other hand, 
easy_install --prefix ~/usr scikit-image 
works. 

Any idea of what is going on?

Thanks,

Jean 

Stéfan van der Walt

unread,
Oct 14, 2013, 10:39:12 AM10/14/13
to scikit-image
On Mon, Oct 14, 2013 at 3:38 PM, Jean K <jean.k...@gmail.com> wrote:
>> ipdb> print popenargs
>> (['cython', '-o', '/homes/jk712/scikit-image/skimage/feature/_template.c',
>> '/homes/jk712/scikit-image/skimage/feature/_template.pyx'],)

It looks like cython wasn't installed correctly. Could you try the
"cython" command from the terminal?

Stéfan

Jean K

unread,
Oct 14, 2013, 11:21:50 AM10/14/13
to scikit...@googlegroups.com
You are absolutely right, thanks!
I had already installed Cython locally but didn't add it properly to the PATH.

However after I fixed it I got another error:
 [...]
building extension "skimage.segmentation._felzenszwalb_cy" sources
building extension "skimage.segmentation._quickshift" sources
building extension "skimage.segmentation._slic" sources
building data_files sources
build_src: building npy-pkg config files
customize UnixCCompiler
customize UnixCCompiler using build_ext
building 'skimage._shared.geometry' extension
compiling C sources
C compiler: x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC
creating build
creating build/temp.linux-x86_64-2.7
compile options: '-I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c'
x86_64-linux-gnu-gcc: geometry.c
x86_64-linux-gnu-gcc: error: geometry.c: No such file or directory
x86_64-linux-gnu-gcc: fatal error: no input files
compilation terminated.
x86_64-linux-gnu-gcc: error: geometry.c: No such file or directory
x86_64-linux-gnu-gcc: fatal error: no input files
compilation terminated.
error: Command "x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c geometry.c -o build/temp.linux-x86_64-2.7/geometry.o" failed with exit status 4

Any idea?

Thanks,

Jean


2013/10/14 Stéfan van der Walt <ste...@sun.ac.za>

--
You received this message because you are subscribed to a topic in the Google Groups "scikit-image" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scikit-image/zV05Huop18c/unsubscribe.
To unsubscribe from this group and all of its topics, send an email to scikit-image...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Stéfan van der Walt

unread,
Oct 14, 2013, 11:24:29 AM10/14/13
to scikit-image
On Mon, Oct 14, 2013 at 5:21 PM, Jean K <jean.k...@gmail.com> wrote:
> You are absolutely right, thanks!
> I had already installed Cython locally but didn't add it properly to the
> PATH.
>
> However after I fixed it I got another error:

Do you have Cython v0.19 installed? If so, then perhaps try a clean build.

Stéfan

Jean K

unread,
Oct 14, 2013, 12:06:03 PM10/14/13
to scikit...@googlegroups.com
Yes
% cython -V
Cython version 0.19.2

I did python setup.py clean before installing but still get the same error... 


2013/10/14 Stéfan van der Walt <ste...@sun.ac.za>
On Mon, Oct 14, 2013 at 5:21 PM, Jean K <jean.k...@gmail.com> wrote:

Stéfan

Johannes Schönberger

unread,
Oct 14, 2013, 12:11:32 PM10/14/13
to scikit...@googlegroups.com
Try ``make clean``.
> You received this message because you are subscribed to the Google Groups "scikit-image" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to scikit-image...@googlegroups.com.

Jean K

unread,
Oct 14, 2013, 12:49:40 PM10/14/13
to scikit...@googlegroups.com
Great, it works now!

Thanks a lot,

Sorry for the spam.

Cheers,

Jean


2013/10/14 Johannes Schönberger <js...@demuc.de>
Reply all
Reply to author
Forward
0 new messages