Error Installing pycuda

I cannot install Pycuda for Jetson nano, as I require it for running inference with tensorrt.
I tried everything including editing the ~/.bashrc as given in earlier posts, tried installing cython, tried soft linking etc. Stll getting the error as follows: [PDF]
Error.pdf (92.3 KB)

I have read all th previous solutions which worked for other people.
Ubuntu 18.04
Jetson Nano with JetPack 4.6
Cuda 10.2
Numpy version :1.13.3

Please help me out.
Thanks in advance!


Please try to add the CUDA link and try it again.

$ echo "export PATH=/usr/local/cuda-10.2/bin:\$PATH" >> ~/.bashrc
$ echo "export LD_LIBRARY_PATH=/usr/local/cuda-10.2/lib64:\$LD_LIBRARY_PATH" >> ~/.bashrc
$ source ~/.bashrc


Hi @AastaLLL, thanks for the reply.

Sudo pip3 install cython
export CPATH=$PATH:/usr/local/cuda-10.2/targets/aarch64-linux/include

export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/cuda-10.2/targets/aarch64-linux/lib

export CUDA_INC_DIR=/usr/local/cuda/include

export PATH=$PATH:/usr/local/cuda/bin
I have written these 4 lines in my ~/.bashrc file, and then I did :
Sudo pip3 install pycuda —user

Still got the error while installing.
Also it tries 3 different versions of Pycuda

  1. 2022 .tar.gz
  2. 2021
  3. 2020 versions
    Still failing the install.
    Thank you,
    Dhairya Sachdeva


The configure looks different.
Would you mind giving it a try?

Hi @AastaLLL

Sure I’ll let you know after trying!

Hi @AastaLLL,
I did these steps:

$ echo “export PATH=/usr/local/cuda-10.2/bin:$PATH” >> ~/.bashrc
$ echo “export LD_LIBRARY_PATH=/usr/local/cuda-10.2/lib64:$LD_LIBRARY_PATH” >> ~/.bashrc
$ source ~/.bashrc

Installation failed again, same errors as before attached a pdf error file.
error.txt (86.9 KB)

After the commands you specified I did:
Sudo pip3 install Pycuda —user

Thanks for the help!
I solved the error in a different way. Successfully installed pycuda 2022.1 for my Jetson nano.

Good to know this.
Thanks for the update.

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