Error installing Scipy from repository with latest Cython installed

1,627 views
Skip to first unread message

Jose Guzman

unread,
Apr 26, 2013, 10:28:37 AM4/26/13
to scipy...@googlegroups.com
Hi everybody,

I am trying to install the latest developmental version of Scipy, for
that i did:

>>> git clone https://github.com/scipy/scipy.git Scipy

when I enter in the Scipy folder and type
>>> python setup.py build,

I found the following error:

Exception: Cython failed
Traceback (most recent call last):
File "setup.py", line 229, in <module>
setup_package()
File "setup.py", line 222, in setup_package
generate_cython()
File "setup.py", line 159, in generate_cython
raise RuntimeError("Running cythonize failed!")
RuntimeError: Running cythonize failed!


My cython version is:
>>> cython --version 0.19

Any ideas?

Thanks in advance


--
Jose Guzman
http://www.ist.ac.at/~jguzman/

Rishi Sharma

unread,
May 8, 2013, 2:12:03 AM5/8/13
to scipy...@googlegroups.com
I'm getting the same error while trying to build the epd numpy and scipy with cython0.16. The numpy build works smoothly,

In [2]: numpy.__version__
Out[2]: '1.6.1'

but, the development version of scipy fails to compile,
(epd-7.3.2)bash-3.2$ python setup.py install
Cythonizing sources
Processing scipy/special/_ufuncs_cxx.pyx
....
Error compiling Cython file:
------------------------------------------------------------
...

######################################################################
# Function specializers
######################################################################
def get_nonzero_line(np.ndarray[data_t] a):
    return <Py_intptr_t> fused_nonzero_line[data_t]
                                                 ^
------------------------------------------------------------

_ni_label.pyx:96:50: Type not in fused type

Traceback (most recent call last):
  File "/home/rishi/.python_environments/epd-7.3.2/src/scipy/tools/cythonize.py", line 188, in <module>
    main()
  File "/home/rishi/.python_environments/epd-7.3.2/src/scipy/tools/cythonize.py", line 184, in main
    find_process_files(root_dir)
  File "/home/rishi/.python_environments/epd-7.3.2/src/scipy/tools/cythonize.py", line 176, in find_process_files
    process(cur_dir, fromfile, tofile, function, hash_db)
  File "/home/rishi/.python_environments/epd-7.3.2/src/scipy/tools/cythonize.py", line 153, in process
    processor_function(fromfile, tofile)
  File "/home/rishi/.python_environments/epd-7.3.2/src/scipy/tools/cythonize.py", line 71, in process_pyx
    raise Exception('Cython failed')

Exception: Cython failed
Traceback (most recent call last):
  File "setup.py", line 230, in <module>
    setup_package()
  File "setup.py", line 223, in setup_package

    generate_cython()
  File "setup.py", line 159, in generate_cython
    raise RuntimeError("Running cythonize failed!")
RuntimeError: Running cythonize failed!


(epd-7.3.2)bash-3.2$ cython --version
Cython version 0.16

Rishi Sharma

unread,
May 8, 2013, 3:48:41 AM5/8/13
to scipy...@googlegroups.com
It works with the new version of cython. the main changes from the failed attempt

(a) a new version of cython was used
(b) the virtual environment used distribute, not setuptools (virtualenv --distribute epd-7.3.2)

(see also)
http://stackoverflow.com/questions/15175135/build-scipy-error-cythonize-failed

(epd-7.3.2)bash-3.2$ cython --version
Cython version 0.19
In [4]: numpy.__version__
Out[4]: '1.6.1'
In [2]: scipy.__version__
Out[2]: '0.10.1'


Reply all
Reply to author
Forward
0 new messages