Opencv-contrib is free or not?

then install python and then opencv-contrib-python · PyPI

if you need it for C++ code, you will have to clone both repos and then build opencv with contrib modules.