Threadpoolctl is a Python library that provides helpers to limit the number of threads used in threadpool-backed native libraries, such as BLAS and OpenMP, commonly used in scientific computing and data science. The current version is 3.6.0, released on March 13, 2025. The library is actively maintained with regular updates to support new Python versions and improve functionality.
pip install threadpoolctlVerified import paths — ran on the pinned version, not inferred.
This script demonstrates how to introspect threadpool information and limit the number of threads used by BLAS libraries using threadpoolctl.
Upgrade to Python 3.9 or later to maintain compatibility.
Ensure only one OpenMP library is loaded to prevent potential issues.
Install the 'numpy' package using pip: `pip install numpy`
Install the missing package using 'pip install numpy' or ensure the package is listed in your project's 'requirements.txt' and installed.
pip install threadpoolctl
from threadpoolctl import threadpool_limits
Ensure that libraries like NumPy or SciPy are imported and correctly linked to a threadpool-enabled BLAS/LAPACK implementation (e.g., OpenBLAS, MKL) before using 'threadpoolctl'.
No dependency data recorded yet.