# Installing cupy

**URL:** <https://ask.cyberinfrastructure.org/t/installing-cupy/1482>\
**Category:** Yale\
**Tags:** python, gpu, cuda\
**Created:** [August 24, 2020, 10:48am UTC](https://ask.cyberinfrastructure.org/t/installing-cupy/1482 "2020-08-24T10:48:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![antoinearnoud](https://ask.cyberinfrastructure.org/letter_avatar_proxy/v4/letter/a/e36b37/32.png) [@antoinearnoud](https://ask.cyberinfrastructure.org/u/antoinearnoud)\
**Post date:** [August 24, 2020, 10:48am UTC](https://ask.cyberinfrastructure.org/t/installing-cupy/1482/1 "2020-08-24T10:48:10Z")

</div>

Hi,

I am using the python module OPT. I would like to use the GPU implementation of some functions. It seems it requires the module `cupy`. I tried to install `cupy` (`pip install cupy`) but I get an error:

> ERROR: CUDA could not be found on your system.

How can I do?  
Thank you

Antoine

for GPU implementation of OPT, see: [ot.gpu — POT Python Optimal Transport 0.8.1.0 documentation](https://pythonot.github.io/gen_modules/ot.gpu.html?highlight=gpu#module-ot.gpu)

---

<div class="post-metadata">

**Author:** ![brevans](https://ask.cyberinfrastructure.org/user_avatar/ask.cyberinfrastructure.org/brevans/32/332_2.png) [@brevans](https://ask.cyberinfrastructure.org/u/brevans)\
**Post date:** [August 26, 2020, 1:44pm UTC](https://ask.cyberinfrastructure.org/t/installing-cupy/1482/2 "2020-08-26T13:44:56Z")

</div>

Hi Antoine,

To take advantage of GPUs you’ll need to:

- [Request a GPU](https://docs.ycrc.yale.edu/clusters-at-yale/guides/gpus-cuda/#requesting-gpu-nodes) from Slurm. The simplest example is the `--gres=gpu:1` option to `srun` or `sbatch`. You can verify an interactive job has GPUs available by running the `nvidia-smi` command and seeing GPU(s) listed.
- Make sure you have the required version of CUDA [loaded as a module](https://docs.ycrc.yale.edu/clusters-at-yale/applications/modules/). You can get a list of available CUDA module versions with the command `module avail CUDA/` . You’ll need the same module loaded at compile and runtime.
