Skip to content

No module named 'cuda' #130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
AdamSEY opened this issue Jun 17, 2024 · 2 comments
Open

No module named 'cuda' #130

AdamSEY opened this issue Jun 17, 2024 · 2 comments

Comments

@AdamSEY
Copy link

AdamSEY commented Jun 17, 2024

pip install cuda-python
Requirement already satisfied: cuda-python

python export.py -o yolov10n.onnx -e yolov10.trt --end2end --v10 -p fp32

File "TensorRT-For-YOLO-Series-cuda-python\export.py", line 8, in
from cuda import cudart
ModuleNotFoundError: No module named 'cuda'

@Linaom1214
Copy link
Owner

pip install cuda-python Requirement already satisfied: cuda-python

python export.py -o yolov10n.onnx -e yolov10.trt --end2end --v10 -p fp32

File "TensorRT-For-YOLO-Series-cuda-python\export.py", line 8, in from cuda import cudart ModuleNotFoundError: No module named 'cuda'

install cuda-python and tensorrt

pip install tensorrt
pip install cuda-python

@NadimDib
Copy link

@AdamSEY if pip install cuda-python does not work for you it's probably because you are using a jetson device like the AGX Xavier (like me) or so. pip3 will not be able to find a compatible cuda-python version so you should downgrade to a slightly older one. I used pip3 install cuda-python==11.5.0 and it worked. It's going to depend on your Jetpack version (I have 5.1.5). If that doesn't work try to change the versions and iterate over them. It's a shame really :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants