Build OpenCV Python wheel with CUDA support (Jetson Xavier NX Developer Kit)

Hi everyone,

Since quite some time I’ve been struggling in creating a Python wheel for OpenCV with CUDA and cuDNN enabled. I successfully built it from source, but as I mentioned what I want now is an actual .whl file.

I’ve been trying to use what is explained here, both with pip3 wheel . --verbose and python3 setup.py bdist_wheel within a virtual environment. As a matter of fact, here is the output of the command pip wheel . --verbose.

My board has installed:

  • Jetpack 5.1.2 [L4T 35.4.1]
  • CUDA 11.4.315
  • cuDNN 8.6.0.166
  • Python 3.8.10

Has anyone managed to create a wheel file? Is there any other way I could do so?

Thanks in advance.

Hi @raffaele.viterbo96 ,
I believe you may try getting better assistance on Issues · opencv/opencv-python · GitHub Forum.

Thanks

1 Like

Hi Raffaele,

I am facing quite the same issue - I also want to build the openCV with cuda support on my system.
Since I am quite new to this, could you give me a guidance on how to build it manually?
And if you managed to build a python wheel, also on this?

I have following versions:

  • Jetpack 5.1.1 [L4T 35.3.1]
  • cuda 11.4.315
  • cuDNN 8.6.0.166
  • Python 3.8.10

Thanks in advance.