Cython on windows (again?)

Dan Farmer dfarmernv at gmail.com
Mon May 16 00:37:08 EDT 2011


So I was able to resolve this. In EPD the cython.py file is located in
site-packages, but cython.exe evidently expects it to be in Scripts.
So I moved cython.py to c:\Python27\Scripts and it worked
(incidentally, I compared this to python x,y and it defaults to
putting cython.py in Scripts, so scikits.image builds out of the box
with python x,y on windows).

I don't know distutils well enough to say if something should change
on the scikits.image side or if Enthought just needs to tweak their
setup. Unfortunately that's not the end of the issues, but I'll send a
separate email for future Google searchers.

Thanks,
Dan

On Thu, May 12, 2011 at 8:53 AM, Dan Farmer <dfarmernv at gmail.com> wrote:
> Hi Guys,
> So the semester is over and I'm starting to gear back up (sorry for dropping
> off the map for bit :( ). Since my last work on the project I got a new
> computer so I'm now working in Windows using EPD 7. I checked everything out
> last night and updated, but when I tried to build in place I get the
> traceback below. EPD 7 does come with cython 0.14.1
> Any ideas to help me get up and running again?
> Thanks,
> Dan
> cython -o C:\source\scikits.image\scikits\image\opencv\opencv_backend.c.new
> C:\source\scikits.image\scikits\image\opencv\opencv_backend.pyx
> Cython compilation of opencv_backend.pyx failed. Falling back on
> pre-generated file.
> python.exe : C:\Python27\python.exe: can't open file
> 'C:\Python27\Scripts\cython.py': [Errno 2] No such file or directory
>
> Traceback (most recent call last):
>   File "setup.py", line 97, in <module>
>     cmdclass={'build_py': build_py},
>   File "C:\Python27\lib\site-packages\numpy\distutils\core.py", line 152, in
> setup
>     config = configuration()
>   File "setup.py", line 44, in configuration
>     config.add_subpackage(DISTNAME)
>   File "C:\Python27\lib\site-packages\numpy\distutils\misc_util.py", line
> 972, in add_subpackage
>     caller_level = 2)
>   File "C:\Python27\lib\site-packages\numpy\distutils\misc_util.py", line
> 941, in get_subpackage
>     caller_level = caller_level + 1)
>   File "C:\Python27\lib\site-packages\numpy\distutils\misc_util.py", line
> 878, in _get_configuration_from_s
> etup_py
>     config = setup_module.configuration(*args)
>   File "scikits\image\setup.py", line 8, in configuration
>     config.add_subpackage('opencv')
>   File "C:\Python27\lib\site-packages\numpy\distutils\misc_util.py", line
> 972, in add_subpackage
>     caller_level = 2)
>   File "C:\Python27\lib\site-packages\numpy\distutils\misc_util.py", line
> 941, in get_subpackage
>     caller_level = caller_level + 1)
>   File "C:\Python27\lib\site-packages\numpy\distutils\misc_util.py", line
> 878, in _get_configuration_from_setup_py
>     config = setup_module.configuration(*args)
>   File "scikits\image\opencv\setup.py", line 20, in configuration
>     cython(cython_files, working_path=base_path)
>   File "C:\source\scikits.image\scikits\image\_build.py", line 51, in cython
>     os.remove(c_file_new)
> WindowsError: [Error 2] The system cannot find the file specified:
> 'C:\\source\\scikits.image\\scikits\\ima
> ge\\opencv\\opencv_backend.c.new'



More information about the scikit-image mailing list