sklearn/utils/_cython_blas.pyx fails to cythonize if scipy is not installed in the env
See original GitHub issueNow that we don’t cythonize before creating the sdist, using the sdist fails to properly install the package if the freshly created environment doesn’t include scipy.
pip install scikit-learnxxx.tar.gz
on an environment which has numpy and cython, will fail while trying to cythonize sklearn/utils/_cython_blas.pyx
.
Example error:
sklearn/utils/_cython_blas.pyx:203:40: Converting to Python object not allowed without gil
Error compiling Cython file:
------------------------------------------------------------
...
if floating is float:
sgemm(&ta_, &tb_, &m, &n, &k, &alpha, A,
&lda, B, &ldb, &beta, C, &ldc)
else:
dgemm(&ta_, &tb_, &m, &n, &k, &alpha, A,
&lda, B, &ldb, &beta, C, &ldc)
^
------------------------------------------------------------
sklearn/utils/_cython_blas.pyx:203:43: Converting to Python object not allowed without gil
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
build scipy error cythonize failed - python - Stack Overflow
For me, this problem occurred due to incompatible python + pandas versions due to incorrect environment configurations despite using Anaconda.
Read more >build failure when cython files are not "cythonized" beforehand.
c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation. error: command 'gcc' failed with exit...
Read more >Adding Cython to SciPy — SciPy v1.7.0 Manual
Cython is an optimising static compiler for both the Python programming language and the extended Cython programming language (based on Pyrex). It makes...
Read more >Source Files and Compilation - Cython's Documentation
Note that if you are not relying on cythonize or setuptools, you will not ... running python setup.py install is to create a...
Read more >High performance Python: Compiling Cython code
Typical usage of Cython will include the writing of Python and Cython code ... of Cython pyximport.install() from fib import fib # This...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
yeah I’m already adding to the
maintainers.rst
as I go. I’ll submit a separate PR after the release 😃BTW @adrinjalali whatever issues you’re going through are a great opportunity to document the subtleties of the releasing process… 😉