# Import cv2 into program

**URL:** <https://forum.opencv.org/t/import-cv2-into-program/603>\
**Category:** Uncategorized\
**Created:** [December 30, 2020, 10:51pm UTC](https://forum.opencv.org/t/import-cv2-into-program/603 "2020-12-30T22:51:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jdolecki](https://avatars.discourse-cdn.com/v4/letter/j/e495f1/32.png) [@Jdolecki](https://forum.opencv.org/u/Jdolecki)\
**Post date:** [December 30, 2020, 10:51pm UTC](https://forum.opencv.org/t/import-cv2-into-program/603/1 "2020-12-30T22:51:57Z")

</div>

I’m new at this  
Is import cv2 the correct instruction for use with the latest version

When I try to run sample programs it say cv2 not found .

Thanks john.!..

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [December 31, 2020, 3:34am UTC](https://forum.opencv.org/t/import-cv2-into-program/603/2 "2020-12-31T03:34:26Z")

</div>

yes, `import cv2` is the correct way for now (OpenCV versions 2.x, 3.x, 4.x). it is recommended to use `import cv2 as cv` for easy porting because it is planned to rename that import to simply `cv` in a future release of OpenCV.

if you can’t import `cv2`, the installation of the package must have failed.

python’s package index has a package called `opencv-python`, which is maintained by a volunteer and tracks official releases. you can install that with `pip install opencv-python` (or pip3 if you’re on linux).
