- Jetson Nano B01
- JetPack 4.6.1 image burned on SD
- Python 3.6.9
- pycuda 2022.1
path env variable added
export PATH=/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
export LD_LIBRARY_PATH=/usr/local/cuda/lib64
export CPATH=/usr/local/cuda-10.2/targets/aarch64-linux/include
export LIBRARY_PATH=/usr/local/cuda-10.2/targets/aarch64-linux/lib
export CUDA_ROOT=/usr/local/cuda
Installed pycuda like below without issues
$ sudo apt-get install python3-pip
$ pip3 install pycuda --user
test_driver.py works without issues like below:
python3 ./pycuda-2022.1/test/test_driver.py
However I cannot use pycuda if not under ./pycuda-2022.1/:
~/Desktop/temp$ python3
Python 3.6.9 (default, Mar 10 2023, 16:46:00)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pycuda
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/komushi/Desktop/temp/pycuda.py", line 2, in <module>
import pycuda.autoinit
ModuleNotFoundError: No module named 'pycuda.autoinit'; 'pycuda' is not a package
I have the same issue like this but his resolution does not work in my case.