How to mitigate a version conflict in CMake

.When I build OpenCV-dnn with CMake (along this lines: https://towardsdev.com/installing-opencv-4-with-cuda-in-ubuntu-20-04-fde6d6a0a367) at the stage of cmake command I get

Could NOT find PythonLibs: Found unsuitable version “3.8.14”, but required is exact version “3.8.13”.

After command
cmake
-D CMAKE_BUILD_TYPE=RELEASE
-D CMAKE_INSTALL_PREFIX=/usr/local
-D WITH_CUDA=ON
-D WITH_CUDNN=ON
-D WITH_CUBLAS=ON
-D WITH_TBB=ON
-D OPENCV_DNN_CUDA=ON
-D OPENCV_ENABLE_NONFREE=ON
-D CUDA_ARCH_BIN=6.1
-D OPENCV_EXTRA_MODULES_PATH=$HOME/acne_prod/opencv_contrib/modules
-D BUILD_EXAMPLES=OFF
-D HAVE_opencv_python3=ON

How can I change the requirement to “3.8.13-14” to try if it works? I don’t want to break the dev server just to try building the artefact. Or is this hardwired inside of the library?

After creating and activating Python 3.8.13 Anaconda environment I get
– Found PythonInterp: /home/sam/anaconda3/envs/cvdnn/bin/python3 (found suitable version “3.8.13”, minimum required is “3.2”)
– Could NOT find PythonLibs: Found unsuitable version “3.8.14”, but required is exact version “3.8.13” (found /usr/lib/x86_64-linux-gnu/libpython3.8.so)

So PythonInterp finds the required version 3.8.13, but PythonLibs falls back to system version and cmake fails there.