can't compile on alpine `x86_64` - Cython crashes with Pythran installed
See original GitHub issuePlease 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
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (10 by maintainers)
Top Results From Across the Web
Collecting numpy causes docker build to crash - Stack Overflow
Use a debian-based image, like python:3.7-slim. Your distribution is missing the Development Tools and cannot compile the C program parts of ...
Read more >2018-August.txt - Python mailing list
My macOS setup is currently not working so I can't test this myself. ... WithManagerTestBarrier fails randomly on x86 Windows7 3.x buildbot ...
Read more >Apache Arrow 2.0.0 (2020-10-13)
... Flight does not build out of the box on Alpine Linux; ARROW-7226 - [JSON][Python] Json loader fails on example in documentation.
Read more >grpcio legacy-install-failure | The AI Search Engine You Control
Fixed this annoying issue by using pyenv (with python 3.10) rather than Miniforge and installing version 1.44.0 of grpcio before google-cloud-aiplatform .
Read more >https://raw.githubusercontent.com/cnuernber/arrow/...
... [Python] crashes when reading parquet file compressed with snappy ... [R] Can't install arrow 0.17 on Ubuntu 18.04 R 3.6.3 ...
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
On windows. Something I encountered that is related to the tempita issue. Somehow existence of
pythran
is enough to trigger the issue and without it everything works. I will create some time later to dig deeper.@ilayn on Alpine, or on some other platform?