Open
Description
Steps to reproduce:
- Use the public.ecr.aws/lambda/python:3.11 Docker base image.
- In a Dockerfile, copy in a requirements.txt containing numpy
- Run
pip install -r requirements.txt
. - Observe that pip falls back to building NumPy 2.3.0 from source and fails due to missing C compiler.
Error message:
#7 2.842 Downloading numpy-2.3.0.tar.gz (20.4 MB)
#7 2.990 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 20.4/20.4 MB 132.5 MB/s eta 0:00:00
#7 5.039 Installing build dependencies: started
#7 7.540 Installing build dependencies: finished with status 'done'
#7 7.540 Getting requirements to build wheel: started
#7 7.639 Getting requirements to build wheel: finished with status 'done'
#7 7.644 Installing backend dependencies: started
#7 8.255 Installing backend dependencies: finished with status 'done'
#7 8.256 Preparing metadata (pyproject.toml): started
#7 9.146 Preparing metadata (pyproject.toml): finished with status 'error'
#7 9.151 error: subprocess-exited-with-error
#7 9.151
#7 9.151 × Preparing metadata (pyproject.toml) did not run successfully.
#7 9.151 │ exit code: 1
#7 9.151 ╰─> [20 lines of output]
#7 9.151 + /var/lang/bin/python3.11 /tmp/pip-install-pv61bimt/numpy_a2374ad6e38d46daba33ed2d9893ca9c/vendored-meson/meson/meson.py setup /tmp/pip-install-pv61bimt/numpy_a2374ad6e38d46daba33ed2d9893ca9c /tmp/pip-install-pv61bimt/numpy_a2374ad6e38d46daba33ed2d9893ca9c/.mesonpy-rw0po2ou -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/tmp/pip-install-pv61bimt/numpy_a2374ad6e38d46daba33ed2d9893ca9c/.mesonpy-rw0po2ou/meson-python-native-file.ini
#7 9.151 The Meson build system
#7 9.151 Version: 1.6.1
#7 9.151 Source dir: /tmp/pip-install-pv61bimt/numpy_a2374ad6e38d46daba33ed2d9893ca9c
#7 9.151 Build dir: /tmp/pip-install-pv61bimt/numpy_a2374ad6e38d46daba33ed2d9893ca9c/.mesonpy-rw0po2ou
#7 9.151 Build type: native build
#7 9.151 Project name: NumPy
#7 9.151 Project version: 2.3.0
#7 9.151
#7 9.151 ../meson.build:1:0: ERROR: Unknown compiler(s): [['cc'], ['gcc'], ['clang'], ['nvc'], ['pgcc'], ['icc'], ['icx']]
#7 9.151 The following exception(s) were encountered:
#7 9.151 Running `cc --version` gave "[Errno 2] No such file or directory: 'cc'"
#7 9.151 Running `gcc --version` gave "[Errno 2] No such file or directory: 'gcc'"
#7 9.151 Running `clang --version` gave "[Errno 2] No such file or directory: 'clang'"
#7 9.151 Running `nvc --version` gave "[Errno 2] No such file or directory: 'nvc'"
#7 9.151 Running `pgcc --version` gave "[Errno 2] No such file or directory: 'pgcc'"
#7 9.151 Running `icc --version` gave "[Errno 2] No such file or directory: 'icc'"
#7 9.151 Running `icx --version` gave "[Errno 2] No such file or directory: 'icx'"
#7 9.151
#7 9.151 A full log can be found at /tmp/pip-install-pv61bimt/numpy_a2374ad6e38d46daba33ed2d9893ca9c/.mesonpy-rw0po2ou/meson-logs/meson-log.txt
#7 9.151 [end of output]
#7 9.151
#7 9.151 note: This error originates from a subprocess, and is likely not a problem with pip.
#7 9.153 error: metadata-generation-failed
#7 9.153
#7 9.153 × Encountered error while generating package metadata.
#7 9.153 ╰─> See above for output.
#7 9.153
#7 9.153 note: This is an issue with the package mentioned above, not pip.
#7 9.153 hint: See above for details.
#7 9.162
#7 9.162 [notice] A new release of pip is available: 24.0 -> 25.1.1
#7 9.162 [notice] To update, run: pip install --upgrade pip
#7 ERROR: process "/bin/sh -c pip install -r requirements.txt" did not complete successfully: exit code: 1
------
> [3/5] RUN pip install -r requirements.txt:
9.153 error: metadata-generation-failed
9.153
9.153 × Encountered error while generating package metadata.
9.153 ╰─> See above for output.
9.153
9.153 note: This is an issue with the package mentioned above, not pip.
9.153 hint: See above for details.
Additional information:
No response