How we use opencv-python

import cv2
OpenCV bindings requires “numpy” package.
Install it via command:
pip install numpy
Traceback (most recent call last):
File “/home/mayankanand/pyVirtual/lib/python3.12/site-packages/numpy/_core/init.py”, line 23, in
from . import multiarray
File “/home/mayankanand/pyVirtual/lib/python3.12/site-packages/numpy/_core/multiarray.py”, line 10, in
from . import overrides
File “/home/mayankanand/pyVirtual/lib/python3.12/site-packages/numpy/_core/overrides.py”, line 8, in
from numpy._core._multiarray_umath import (
ImportError: libstdc++.so.6: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/mayankanand/pyVirtual/lib/python3.12/site-packages/numpy/init.py”, line 114, in
from numpy.config import show as show_config
File “/home/mayankanand/pyVirtual/lib/python3.12/site-packages/numpy/config.py”, line 4, in
from numpy._core._multiarray_umath import (
File “/home/mayankanand/pyVirtual/lib/python3.12/site-packages/numpy/_core/init.py”, line 49, in
raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  • The Python version is: Python3.12 from “/home/mayankanand/pyVirtual/bin/python3”
  • The NumPy version is: “2.0.2”

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: libstdc++.so.6: cannot open shared object file: No such file or directory

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “”, line 1, in
File “/home/mayankanand/pyVirtual/lib/python3.12/site-packages/cv2/init.py”, line 11, in
import numpy
File “/home/mayankanand/pyVirtual/lib/python3.12/site-packages/numpy/init.py”, line 119, in
raise ImportError(msg) from e
ImportError: Error importing numpy: you should not try to import numpy from
its source directory; please exit the numpy source tree, and relaunch
your python interpreter from there.

I already downloaded using python virtual environment with this pip install opencv-python numpy matplotlib
please suggest me how i correct this issue.

thankyou.