# Error installing Pycuda in WSL2

**URL:** <https://forums.developer.nvidia.com/t/error-installing-pycuda-in-wsl2/279386>\
**Category:** GPU-Accelerated Libraries\
**Tags:** wsl, pycuda\
**Created:** [January 18, 2024, 2:18pm UTC](https://forums.developer.nvidia.com/t/error-installing-pycuda-in-wsl2/279386 "2024-01-18T14:18:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jefbutar](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jefbutar/32/295928_2.png) [@jefbutar](https://forums.developer.nvidia.com/u/jefbutar)\
**Post date:** [January 18, 2024, 2:18pm UTC](https://forums.developer.nvidia.com/t/error-installing-pycuda-in-wsl2/279386/1 "2024-01-18T14:18:40Z")

</div>

I find an error when trying to install pycuda on WSL2 (Windows 10) following the command:

`pip install pycuda`

the error log is huge but it closes with:

```auto
ERROR: Failed building wheel for pycuda
Failed to build pycuda
ERROR: Could not build wheels for pycuda, which is required to install pyproject.toml-based projects

```

I also attached the full log to this post

I already tested the `nvidia-smi` command to verify if there is the right configuration of the GPUs and there is not problem.

```auto
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 545.23.07 Driver Version: 546.12 CUDA Version: 12.3 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA RTX A4500 On | 00000000:17:00.0 Off | Off |
| 30% 28C P8 9W / 200W | 0MiB / 20470MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
| 1 NVIDIA RTX A4500 On | 00000000:73:00.0 On | Off |
| 30% 31C P8 12W / 200W | 1509MiB / 20470MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| No running processes found |
+---------------------------------------------------------------------------------------+

```

I also called the GPUs on tensorflow following `tf.config.get_visible_devices('GPU')` and it finds my GPUs.

```auto
[PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU'), PhysicalDevice(name='/physical_device:GPU:1', device_type='GPU')]

```

I’m running out of ideas of what could be happening. Could you help me to understand what I’m missing? Thanks!  
[pycuda.log](https://forums.developer.nvidia.com/uploads/short-url/n0Do8BBWtittnRdvc5E75w5OT40.log) (2.5 MB)

---

<div class="post-metadata">

**Author:** ![ligum.vladimir](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@ligum.vladimir](https://forums.developer.nvidia.com/u/ligum.vladimir)\
**Post date:** [February 6, 2024, 7:53am UTC](https://forums.developer.nvidia.com/t/error-installing-pycuda-in-wsl2/279386/2 "2024-02-06T07:53:33Z")

</div>

hello  
yesterday i’d a similar error but in ubuntu 22.04  
my solution was :

1. update/reinstall cuda
2. update/reinstall nvidia-smi driver
3. pip3 install pycuda

i hope it’ll work for you

kind regards and have a nice day
