'how to install opencv 4.x with python 3 and opencv 3.x with python 2.7 in Linux?

I installed OpenCV 3.3.1 with python 2.7 (GPU), but I tried to install OpenCV4.x with Python3.

I followed this post here

Output find /usr/local/lib/ -type f -name "cv2*.so" is:

/usr/local/lib/python2.7/dist-packages/cv2/cv2.so
/usr/local/lib/python2.7/site-packages/cv2.so

what is wrong?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source