Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot build spacy from source: cythonize failed #455

Closed
slonik-az opened this issue Jul 14, 2016 · 4 comments
Closed

cannot build spacy from source: cythonize failed #455

slonik-az opened this issue Jul 14, 2016 · 4 comments

Comments

@slonik-az
Copy link

slonik-az commented Jul 14, 2016

I am trying to build spacy 0.101.0 (or git master) using latest stable cython-0.24
$ python setup.py build_ext -i -f

It results in cython error during the "cythonizing" stage of file spacy/gold.cyx:

Error compiling Cython file:

...
cdef dict __Pyx_globals = globals()
if PY_VERSION_HEX >= 0x03040000:

^

EnumType:51:18: undeclared name not builtin: PY_VERSION_HEX
Traceback (most recent call last):
File "/opt/anaconda2/bin/cython", line 6, in
sys.exit(Cython.Compiler.Main.setuptools_main())
File "/opt/anaconda2/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 692, in setuptools_main
return main(command_line = 1)
File "/opt/anaconda2/lib/python2.7/site-packages/Cython/Compiler/Main.py", line 709, in main
result = compile(sources, options)
.................
Exception: Cython failed
Cythonizing sources
Traceback (most recent call last):
File "setup.py", line 225, in
setup_package()
File "setup.py", line 178, in setup_package
generate_cython(root, 'spacy')
File "setup.py", line 120, in generate_cython
raise RuntimeError('Running cythonize failed')
RuntimeError: Running cythonize failed

Thanks,
--Leo

P.S. complete traceback is attached below.
setup_build_ext-log.txt

@dbzm
Copy link

dbzm commented Jul 20, 2016

Having encountered this myself, I can tell you that it is a cython bug. Downgrading to cython 0.23.5 fixed the issue for me.

@binaryaaron
Copy link

@dbzm's solution worked for me as well; centos + anaconda3. don't forget to change directories after you build before you attempt to download spacy's model data. :)

@ghost
Copy link

ghost commented Feb 1, 2017

@dbzm 's solution doesn't work for me (I'm using Cython 23.4)
does anyone else have problems?

@lock
Copy link

lock bot commented May 9, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants