Hi,
Have you added it to the PYTHONPATH variable? For example:
echo 'export PYTHONPATH=/usr/local/lib/python3.6/site-packages/:$PYTHONPATH' >> ~/.bashrc
Below is the steps to compile OpenCV with different python versions for your reference:
Thanks.