Pycuda installation error

I am trying to install pycuda on jupyter notebook in Jetson AGX Orin, Ubunu 24.04. I am getting the below error. I was trying to intall with pipx due to the “eternally managed environment” issue.

command : !pipx install pycuda


Fatal error from pip prevented installation. Full pip output in file:
    /home/orin/.local/state/pipx/log/cmd_2026-06-18_11.38.03_pip_errors.log

pip failed to build package:
    pycuda

Some possibly relevant errors from pip install:
        src/cpp/cuda.hpp:14:10: fatal error: cuda.h: No such file or directory
        error: command '/usr/bin/aarch64-linux-gnu-g++' failed with exit code 1

Error installing pycuda.

it would be great ,if someone can help me

Thanks

— 🤖 This is an automated AI response. I’m here to help, but please verify important details! —

I could not find clear support for that in the provided Jetson AGX Orin documentation. However, I can provide some general guidance based on the context.

The error message indicates that the installation of pycuda failed due to a fatal error in the compilation process. The error message specifically mentions that the file “cuda.h” was not found.

In the provided context, there is a community solution that mentions a similar issue with pycuda installation on Jetson AGX Orin. The solution suggests that the issue might be related to the CUDA version and the installation process.

Here is a possible solution that you can try:

  1. Check the CUDA version on your Jetson AGX Orin by running the command nvcc --version.
  2. Make sure that the CUDA version is compatible with the pycuda version you are trying to install.
  3. Try installing pycuda using the following command: pip install pycuda --user
  4. If the installation fails, try setting the PATH and LD_LIBRARY_PATH environment variables to point to the CUDA installation directory. For example:
export PATH=/usr/local/cuda-11.4/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-11.4/lib64:$LD_LIBRARY_PATH
  1. Try installing pycuda again using the same command.

Please note that this is just a general guidance, and the solution may not work for your specific case. If you are still experiencing issues, you may want to seek further assistance from the NVIDIA support team or the Jetson AGX Orin community forum.

— We support team will also look into your issue to have further suggestions soon. please stay tuned. —

wget https://github.com/inducer/pycuda/archive/refs/tags/v2025.1.3.tar.gz

https://wiki.tiker.net/PyCuda/Installation/Linux/

Hi,

As mentioned above, please export the CUDA path and try it again.

We can install it without issue on the JetPack 7.2 environment:

$ export PATH=/usr/local/cuda/bin:$PATH
$ export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
$ pip install pycuda

Thanks.