Installation¶
Runtime Requirements¶
cuda.bindings
supports the same platforms as CUDA. Runtime dependencies are:
Driver: Linux (450.80.02 or later) Windows (456.38 or later)
CUDA Toolkit 12.x
Installing from PyPI¶
$ pip install cuda-python
Installing from Conda¶
$ conda install -c conda-forge cuda-python
Installing from Source¶
Requirements¶
CUDA Toolkit headers[1]
Source builds require that the provided CUDA headers are of the same major.minor version as the cuda.bindings
you’re trying to build. Despite this requirement, note that the minor version compatibility is still maintained. Use the CUDA_HOME
(or CUDA_PATH
) environment variable to specify the location of your headers. For example, if your headers are located in /usr/local/cuda/include
, then you should set CUDA_HOME
with:
$ export CUDA_HOME=/usr/local/cuda
See Environment Variables for a description of other build-time environment variables.
Note
Only cydriver
, cyruntime
and cynvrtc
are impacted by the header requirement.
Editable Install¶
You can use
$ pip install -v -e .
to install the module as editable in your current Python environment (e.g. for testing of porting other libraries to use the binding).