CUDA/Jetpack

I have a jetson xavier. I installed the operating system I thought jetpack came with cuda installed and all the gpu drivers but when i try to use pycuda it is telling me I dont have the drivers.

import pycuda.driver as cuda

File “/home/throwaway/Downloads/pycuda/pycuda/driver.py”, line 62, in
from pycuda._driver import * # noqa
ImportError: No module named _driver

Any info on setting up python gpu environment and where to download all the gpu drivers for jetson xavier?

thanks.

Hi,

How do you install pyCUDA?

I can import pyCUDA without issue after this installation command:

pip3 install numpy pycuda --user
$ python3
>> import pycuda.driver as cuda

Thanks.

when I try to download it says requirement already satisfied. When I run
python3
import pycuda.driver as cuda

I get
from pycuda._driver import * # noqa
ModuleNotFoundError: No module named 'pycuda._driver

Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (1.13.3)
Requirement already satisfied: pycuda in /usr/local/lib/python3.6/dist-packages/pycuda-2019.1.2-py3.6-linux-aarch64.egg (2019.1.2)
Requirement already satisfied: pytools>=2011.2 in /home/throwaway/.local/lib/python3.6/site-packages (from pycuda) (2020.1)
Requirement already satisfied: decorator>=3.2.0 in /usr/lib/python3/dist-packages (from pycuda) (4.1.2)
Requirement already satisfied: appdirs>=1.4.0 in /home/throwaway/.local/lib/python3.6/site-packages (from pycuda) (1.4.3)
Requirement already satisfied: mako in /usr/lib/python3/dist-packages (from pycuda) (1.0.7)
Requirement already satisfied: six>=1.8.0 in /usr/lib/python3/dist-packages (from pytools>=2011.2->pycuda) (1.11.0)

ok I think it was because I was trying to run files importing pycuda from within the directory I downloaded pycuda

Hi,

So the issue is fixed after changing the directory, right?
Thanks.

Yep I guess pycuda couldn’t find the files while trying to execute from the directory that it was downloaded in