{"id":24131,"library":"nvidia-libnvcomp-cu12","title":"NVIDIA nvcomp for CUDA 12","description":"NVIDIA nvcomp is a high-speed lossless compression/decompression library designed for use on NVIDIA GPUs. This package provides the pre-built CUDA 12 binaries (libnvcomp.so) for Python. Version 5.2.0.13 is current. Release cadence is tied to CUDA toolkit releases.","status":"active","version":"5.2.0.13","language":"python","source_language":"en","source_url":"https://github.com/NVIDIA/nvcomp","tags":["nvidia","compression","gpu","cuda12"],"install":[{"cmd":"pip install nvidia-libnvcomp-cu12","lang":"bash","label":"Latest from PyPI"}],"dependencies":[],"imports":[{"note":"The package's main purpose is to provide the shared library; direct Python usage typically occurs via cffi or ctypes wrappers.","wrong":"","symbol":"cffi","correct":"from cffi import FFI"}],"quickstart":{"code":"import ctypes\nimport os\n\n# Load the library (adjust path if needed)\nlib_path = os.environ.get('NVCOMP_LIB_PATH', 'libnvcomp.so')\ntry:\n    lib = ctypes.CDLL(lib_path)\n    print('nvcomp library loaded successfully')\nexcept OSError as e:\n    print(f'Failed to load: {e}')","lang":"python","description":"Verify that the nvcomp shared library is accessible and loadable."},"warnings":[{"fix":"Install a Python wrapper (e.g., `nvcomp` from NVIDIA or use ctypes directly).","message":"This package only provides the compiled shared library (libnvcomp.so) for CUDA 12. It does not include Python bindings; you must use ctypes, cffi, or a higher-level library like cuPy or RAPIDS.","severity":"gotcha","affected_versions":"all"},{"fix":"Use the appropriate `nvidia-libnvcomp-cuX` package for your CUDA version, or install the CUDA 12 toolkit.","message":"The library is version-specific to CUDA 12. If you are using a different CUDA version (e.g., 11.x), this package will not work and may cause runtime errors.","severity":"gotcha","affected_versions":"all"},{"fix":"Migrate calls from `nvcompGdeflate*` to `nvcompBitcomp*` functions.","message":"Some older APIs in nvcomp are deprecated in version 5.2.0. In particular, the GDeflate API has been superseded by Bitcomp; old function names still exist but may be removed in a future release.","severity":"deprecated","affected_versions":">=5.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Set LD_LIBRARY_PATH to include the site-packages/nvidia/libnvcomp/cu12 directory, or use os.add_dll_directory on Windows.","cause":"The package installs the .so file, but it may not be on the library search path.","error":"OSError: libnvcomp.so: cannot open shared object file: No such file or directory"},{"fix":"Use `from cffi import FFI` (note: this is a common mistake but actually `from cffi import FFI` is correct).","cause":"Attempting to use cffi without importing correctly.","error":"AttributeError: module 'cffi' has no attribute 'FFI'"},{"fix":"Install the NVIDIA driver and CUDA toolkit, or if using a container, ensure the base image includes CUDA.","cause":"The NVIDIA CUDA driver runtime library is not installed or not in the library path.","error":"ImportError: libcuda.so.1: cannot open shared object file: No such file or directory"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}