Build opencv-python-headless from source?

Hello, can someone help me build opencv-python-headless on Ubuntu 18.04 with CUDA support? I’m using NVIDIA Jetson Nano (Jetpack 4.6) and I was able to build Opencv 4.4.0 with CUDA support using this tutorial: Install OpenCV 4.4 on Jetson Nano - Q-engineering

However, easyocr apparently requires the headless version of opencv. I’m fairly new to program installation from source so any help would be greatly appreciated. Thank you!

it doesn’t “require” the headless package. it is satisfied with merely the headless package.

the headless variant comes with no GUI.

I’m sure easyocr will be perfectly happy with the regular variant, which includes GUI facilities (imshow).

I’m guessing python/pip/whatever dependencies aren’t flexible enough to specify “any of” relations.

You’re right. I was able to install easyocr using the in github. I simply removed opencv-python-headless in requirements.txt (since I already have a CUDA enabled opencv). Many thanks~