Source Code Compilation and Build
Obtain the NumPy source code, build a wheel from the source code, and install the local build product.
- Obtain the NumPy 2.4.4 source code.
1 2 3
mkdir -p /tmp/numpy-build/dist python3 -m pip download --no-build-isolation --no-binary=:all: --no-deps \ --dest /tmp/numpy-build numpy==2.4.4
--no-binary=:all is used to disable the download of the precompiled wheel and ensure that the source package is obtained and local build is performed.
- Build the wheel from the source package.
1 2
python3 -m pip wheel --no-build-isolation --no-binary=:all: --no-deps \ --wheel-dir /tmp/numpy-build/dist /tmp/numpy-build/numpy-2.4.4.tar.gz
The following is an example of the build product.
1numpy-2.4.4-cp311-cp311-linux_aarch64.whl
- Install the local build product.
1python3 -m pip install --no-index --find-links /tmp/numpy-build/dist numpy==2.4.4
Parent topic: Developer Guide