{"id":6871,"library":"scipy-openblas32","title":"OpenBLAS 32-bit Integer (LP64) Provider for SciPy/NumPy","description":"scipy-openblas32 provides OpenBLAS, a highly optimized BLAS library, packaged as Python wheels. Its primary purpose is to serve as a build and runtime dependency in CI and local development for NumPy and SciPy, and to be vendored into their official wheels. It bundles all necessary gfortran support libraries, making the wheels self-contained. The current version is 0.3.31.188.0, and it maintains an active release cadence driven by the needs of SciPy and NumPy.","status":"active","version":"0.3.31.188.0","language":"en","source_language":"en","source_url":"https://github.com/MacPython/openblas-libs","tags":["openblas","blas","lapack","scipy","numpy","performance","scientific-computing","build-dependency","lp64","optimized"],"install":[{"cmd":"pip install scipy-openblas32","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Primary consumer as a build/runtime dependency for optimized linear algebra routines.","package":"numpy","optional":false},{"reason":"Primary consumer as a build/runtime dependency for optimized linear algebra routines.","package":"scipy","optional":false}],"imports":[{"note":"This library is primarily for build-time integration by other scientific Python packages (e.g., SciPy, NumPy) and not intended for direct runtime imports by end-user applications. Its Python API exposes functions for build systems to locate the bundled OpenBLAS components.","symbol":"get_include_dir","correct":"import scipy_openblas32 as so32; so32.get_include_dir()"},{"note":"Primarily for build-time use by packages like SciPy/NumPy.","symbol":"get_lib_dir","correct":"import scipy_openblas32 as so32; so32.get_lib_dir()"},{"note":"Primarily for build-time use by packages like SciPy/NumPy.","symbol":"get_library","correct":"import scipy_openblas32 as so32; so32.get_library()"},{"note":"Primarily for build-time use by packages like SciPy/NumPy to generate pkg-config files for Meson or CMake. This is not for direct use in typical application code.","symbol":"get_pkg_config","correct":"import scipy_openblas32 as so32; so32.get_pkg_config()"}],"quickstart":{"code":"import scipy_openblas32 as so32\n\n# This library is typically used by build systems of other packages\n# to locate the bundled OpenBLAS libraries for compilation.\n# For example, to generate a pkg-config file for a build system:\n# (This code snippet demonstrates the *intended interaction* for other libraries)\n# In a real build process, the output would be redirected to a file, e.g., scipy-openblas32.pc\n\nprint(\"OpenBLAS include directory:\", so32.get_include_dir())\nprint(\"OpenBLAS library directory:\", so32.get_lib_dir())\nprint(\"OpenBLAS pkg-config info:\\n\", so32.get_pkg_config())","lang":"python","description":"This quickstart demonstrates how build systems (e.g., for SciPy or NumPy) would query `scipy-openblas32` to find the necessary OpenBLAS components (include paths, library paths, and pkg-config information) for linking during compilation. It is not intended for direct use in typical end-user Python applications, as `scipy-openblas32` is a low-level dependency provider."},"warnings":[{"fix":"Avoid adding `scipy-openblas32` as a direct runtime dependency unless you are a maintainer of NumPy or SciPy. Use environment-specific solutions (e.g., Conda) or vendor OpenBLAS directly if you require a specific BLAS implementation for your own project.","message":"Do NOT add a direct runtime dependency on `scipy-openblas32` if your project is not NumPy or SciPy. This is explicitly unsupported and highly likely to lead to breakage or symbol conflicts due to internal changes in this repository or due to NumPy/SciPy starting to depend on a different version. This package is solely for use by SciPy and NumPy.","severity":"breaking","affected_versions":"All versions"},{"fix":"Understand that '32' refers to LP64 ABI, not system architecture. If building SciPy/NumPy from source with ILP64 support, you may also need `scipy-openblas64` alongside `scipy-openblas32` for dual-ABI support. Refer to SciPy's BLAS/LAPACK documentation for detailed build instructions.","message":"The `scipy-openblas32` package provides the LP64 ABI (32-bit integer size for array indexing in BLAS functions). This is distinct from `scipy-openblas64`, which provides the ILP64 ABI (64-bit integer size). Both packages can be installed on 64-bit systems; the '32' or '64' refers to the integer size used by the BLAS library internally, not the system architecture. SciPy currently *always requires LP64* but can optionally be built with ILP64 support as well.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Strictly pin the version of `scipy-openblas32` in your build environment to ensure stability.","message":"There is no strong guarantee of backwards compatibility for the symbol names or the small Python API (`get_include_dir`, etc.). Projects using `scipy-openblas32` as a build dependency should pin exact versions (e.g., `==`) in their CI/lock files to prevent unexpected breakage.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure OpenBLAS DLLs are correctly located by the system or explicitly add their directory to the DLL search path at runtime or build time. When building SciPy/NumPy from source on Windows, consult their specific build documentation.","message":"On Windows, dynamic linking of OpenBLAS DLLs can be problematic due to the lack of RPATH support. If not vendored directly into a wheel (as SciPy does), you may need to manually manage the DLL search path using `os.add_dll_directory` or tools like `delvewheel` during custom builds.","severity":"gotcha","affected_versions":"All versions, particularly when building from source on Windows"},{"fix":"Be mindful of the OpenMP/pthreads configuration of BLAS libraries in your environment. Where possible, standardize on one parallelization backend or ensure that only compatible BLAS implementations are used. If custom building, configure OpenBLAS with the desired threading model.","message":"Mixing OpenBLAS builds (e.g., vendored `pthreads`-based OpenBLAS in wheels with system-installed `OpenMP`-based OpenBLAS) can lead to 'oversubscription' issues, where multiple parallelization mechanisms conflict, potentially degrading performance or causing crashes.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Monitor SciPy's release notes for version 1.18.0 and beyond to understand changes in its default BLAS/LAPACK ABI requirements and adjust build strategies accordingly.","message":"The SciPy documentation indicates that the requirement for SciPy to *always* require the LP64 ABI (32-bit integer) is \"very likely changing for the 1.18.0 release.\" This could imply a shift in default ABI preference for SciPy's internal builds, potentially affecting how `scipy-openblas32` is prioritized or used in the future if ILP64 becomes more central.","severity":"deprecated","affected_versions":"SciPy versions >= 1.18.0 (future impact)"}],"env_vars":null,"last_verified":"2026-04-15T00:00:00.000Z","next_check":"2026-07-14T00:00:00.000Z","problems":[]}