'numpy and cv2, no modules available after installation via pip on linux

I installed opencv and numpy using pip on debian 11.2 with python 3.9. In visual studio the modules aren't available and terminal returns:

Traceback (most recent call last):
  File "/home/dominik/projects/object_detection/test.py", line 2, in <module>
    import cv2
ModuleNotFoundError: No module named 'cv2'

python console returns information about packages version.

pip show opencv-python
Name: opencv-python
Version: 4.5.5.64
Summary: Wrapper package for OpenCV python bindings.
Home-page: https://github.com/skvark/opencv-python
Author: None
Author-email: None
License: MIT
Location: /home/dominik/.local/lib/python3.9/site-packages
Requires: numpy, numpy, numpy
Required-by:

how to deal with it?



Sources

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

Source: Stack Overflow

Solution Source