scipy: can't compile on alpine `x86_64` - Cython crashes with Pythran installed
Please describe your issue.
I’m trying to build the wheel on alpine 3.14 x86_64 and it fails with the following error:
Collecting scipy
Using cached scipy-1.7.1.tar.gz (36.1 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status -11:
command: /usr/bin/python3 /usr/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp2uftwhqd
cwd: /tmp/pip-install-2i8zjvju/scipy_b9b335f22566436a952efcb76e4e4026
Complete output (59 lines):
setup.py:490: UserWarning: Unrecognized setuptools command ('dist_info --egg-base /tmp/pip-modern-metadata-uabymhkz'), proceeding with generating Cython sources and expanding templates
warnings.warn("Unrecognized setuptools command ('{}'), proceeding with "
Running from SciPy source directory.
Running scipy/special/_generate_pyx.py
Running scipy/stats/_generate_pyx.py
Running scipy/linalg/_generate_pyx.py
Processing scipy/signal/_spectral.pyx
Processing scipy/signal/_upfirdn_apply.pyx
Processing scipy/signal/_peak_finding_utils.pyx
Processing scipy/signal/_max_len_seq_inner.pyx
Processing scipy/signal/_sosfilt.pyx
Processing scipy/cluster/_optimal_leaf_ordering.pyx
Traceback (most recent call last):
Processing scipy/cluster/_vq.pyx
File "/tmp/pip-install-2i8zjvju/scipy_b9b335f22566436a952efcb76e4e4026/tools/cythonize.py", line 324, in <module>
main()
File "/tmp/pip-install-2i8zjvju/scipy_b9b335f22566436a952efcb76e4e4026/tools/cythonize.py", line 320, in main
find_process_files(root_dir)
File "/tmp/pip-install-2i8zjvju/scipy_b9b335f22566436a952efcb76e4e4026/tools/cythonize.py", line 309, in find_process_files
for result in pool.imap_unordered(lambda args: process(*args), jobs):
File "/usr/lib/python3.9/multiprocessing/pool.py", line 870, in next
raise value
File "/usr/lib/python3.9/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/tmp/pip-install-2i8zjvju/scipy_b9b335f22566436a952efcb76e4e4026/tools/cythonize.py", line 309, in <lambda>
for result in pool.imap_unordered(lambda args: process(*args), jobs):
File "/tmp/pip-install-2i8zjvju/scipy_b9b335f22566436a952efcb76e4e4026/tools/cythonize.py", line 243, in process
processor_function(fromfile, tofile, cwd=path)
File "/tmp/pip-install-2i8zjvju/scipy_b9b335f22566436a952efcb76e4e4026/tools/cythonize.py", line 108, in process_pyx
raise Exception('Cython failed')
Exception: Cython failed
Cythonizing sources
Traceback (most recent call last):
File "setup.py", line 356, in generate_cython
import pip
ModuleNotFoundError: No module named 'pip'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 349, in <module>
main()
File "/usr/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 331, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 151, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "/tmp/pip-build-env-yv3cbv9y/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 166, in prepare_metadata_for_build_wheel
self.run_setup()
File "/tmp/pip-build-env-yv3cbv9y/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 258, in run_setup
super(_BuildMetaLegacyBackend,
File "/tmp/pip-build-env-yv3cbv9y/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 150, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 629, in <module>
setup_package()
File "setup.py", line 613, in setup_package
generate_cython()
File "setup.py", line 365, in generate_cython
raise RuntimeError("Running cythonize failed!")
RuntimeError: Running cythonize failed!
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/47/33/a24aec22b7be7fdb10ec117a95e1e4099890d8bbc6646902f443fc7719d1/scipy-1.7.1.tar.gz#sha256=6b47d5fa7ea651054362561a28b1ccc8da9368a39514c1bbf6c0977a1c376764 (from https://pypi.org/simple/scipy/) (requires-python:>=3.7,<3.10). Command errored out with exit status -11: /usr/bin/python3 /usr/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp2uftwhqd Check the logs for full command output.
I have all the dependencies installed, including blas-dev, lapack-dev and openblas-dev. Pip and cython are installed and are the latest versions.
Interestingly, the same steps taken on alpine 3.14 on armhf, with the same version packages builds successfully (Did not have to specifically install cython there).
Thanks
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17 (11 by maintainers)
Commits related to this issue
- BLD: fix confusing "import pip" failure that should be caught Observed in the traceback of gh-14647. Not the root cause of that build issue, it's just confusing. — committed to rgommers/scipy by rgommers 3 years ago
- BLD: fix confusing "import pip" failure that should be caught (#14665) Observed in the traceback of gh-14647. Not the root cause of that build issue, it's just confusing. — committed to scipy/scipy by rgommers 3 years ago
On windows. Something I encountered that is related to the tempita issue. Somehow existence of
pythranis enough to trigger the issue and without it everything works. I will create some time later to dig deeper.