# Fail to install pycuda

**URL:** <https://forums.developer.nvidia.com/t/fail-to-install-pycuda/287681>\
**Category:** Jetson Orin NX\
**Tags:** pycuda, cuda\
**Created:** [March 28, 2024, 2:11am UTC](https://forums.developer.nvidia.com/t/fail-to-install-pycuda/287681 "2024-03-28T02:11:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![1075471989](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@1075471989](https://forums.developer.nvidia.com/u/1075471989)\
**Post date:** [March 28, 2024, 2:11am UTC](https://forums.developer.nvidia.com/t/fail-to-install-pycuda/287681/1 "2024-03-28T02:11:28Z")

</div>

I want to install **pycuda** but get failed. My **jetpack** is 5.1.3. The **cuda** version is 11.4. I already added path:

```auto
export PATH=/usr/local/cuda-11.4/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-11.4/lib64/{LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

```

I tried to install pycuda via the source codes by:

```auto
python3 configure.py --cuda-root=/usr/local/cuda-11.4
sudo python3 setup.py install

```

The results show the following which implies **pycuda** is installed:

```auto
Installed /usr/lib/python3.8/site-packages/pycuda-2024.1-py3.8-linux-aarch64.egg
Processing dependencies for pycuda==2024.1
Searching for Mako==1.1.0
Best match: Mako 1.1.0
Adding Mako 1.1.0 to easy-install.pth file
Installing mako-render script to /usr/bin

Using /usr/lib/python3/dist-packages
Searching for appdirs==1.4.4
Best match: appdirs 1.4.4
Processing appdirs-1.4.4-py3.8.egg
Adding appdirs 1.4.4 to easy-install.pth file

Using /usr/lib/python3.8/site-packages/appdirs-1.4.4-py3.8.egg
Searching for pytools==2024.1.1
Best match: pytools 2024.1.1
Processing pytools-2024.1.1-py3.8.egg
Adding pytools 2024.1.1 to easy-install.pth file

Using /usr/lib/python3.8/site-packages/pytools-2024.1.1-py3.8.egg
Searching for typing-extensions==4.10.0
Best match: typing-extensions 4.10.0
Adding typing-extensions 4.10.0 to easy-install.pth file

Using /usr/local/lib/python3.8/dist-packages
Searching for platformdirs==4.2.0
Best match: platformdirs 4.2.0
Processing platformdirs-4.2.0-py3.8.egg
Adding platformdirs 4.2.0 to easy-install.pth file

Using /usr/lib/python3.8/site-packages/platformdirs-4.2.0-py3.8.egg
Finished processing dependencies for pycuda==2024.1

```

But if I cd to test folder and run the **test\_driver.py** , the shell tells

```auto
Traceback (most recent call last):
  File "test_driver.py", line 8, in <module>
    from pycuda.tools import mark_cuda_test, dtype_to_ctype
ModuleNotFoundError: No module named 'pycuda'

```

and I can’t find **pycuda** in `pip list`. Can you help me fix this?

---

<div class="post-metadata">

**Author:** ![AastaLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/aastalll/32/14043_2.png) [@AastaLLL](https://forums.developer.nvidia.com/u/AastaLLL)\
**Post date:** [April 8, 2024, 5:24am UTC](https://forums.developer.nvidia.com/t/fail-to-install-pycuda/287681/3 "2024-04-08T05:24:01Z")

</div>

Hi,

Sorry for the late update.  
Could you try to add the folder to `PYTHONPATH` and try it again?

For example:

```auto
$ echo 'export PYTHONPATH=/usr/lib/python3.8/site-packages/:$PYTHONPATH' >> ~/.bashrc
$ source ~/.bashrc

```

Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [May 7, 2024, 7:54am UTC](https://forums.developer.nvidia.com/t/fail-to-install-pycuda/287681/5 "2024-05-07T07:54:45Z")

</div>

Closed on May 7, 2024, 7:54am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
