# Python3-opencv versus opencv-python

**URL:** <https://forum.opencv.org/t/python3-opencv-versus-opencv-python/14405>\
**Category:** Uncategorized\
**Created:** [August 30, 2023, 3:17pm UTC](https://forum.opencv.org/t/python3-opencv-versus-opencv-python/14405 "2023-08-30T15:17:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kir](https://avatars.discourse-cdn.com/v4/letter/k/ea666f/32.png) [@kir](https://forum.opencv.org/u/kir)\
**Post date:** [August 30, 2023, 3:17pm UTC](https://forum.opencv.org/t/python3-opencv-versus-opencv-python/14405/1 "2023-08-30T15:17:16Z")

</div>

I was wondering what is the difference between the two ways of using opencv from python given that opencv-python is now officially part of the opencv project

1. apt installing python3-opencv
2. Pip installing opencv-python

Thanks

---

<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:** [August 30, 2023, 4:47pm UTC](https://forum.opencv.org/t/python3-opencv-versus-opencv-python/14405/2 "2023-08-30T16:47:38Z")

</div>

> [@kir](#):
>
> apt installing python3-opencv

some “maintainer”, _not_ affiliated with OpenCV, maintains that package, i.e. takes care that OpenCV is built in some way and then packaged appropriately for that operating system. these maintainers may not pay very close attention to when new releases of OpenCV happen. that is why it is a lot more likely to be _stale_. by how much, depends on the maintainer.

that’s the difference. `opencv-python`, on PyPI, is built using infrastructure controlled by the OpenCV team, as soon as they release a new version of the library itself.

---

<div class="post-metadata">

**Author:** ![kir](https://avatars.discourse-cdn.com/v4/letter/k/ea666f/32.png) [@kir](https://forum.opencv.org/u/kir)\
**Post date:** [August 30, 2023, 7:03pm UTC](https://forum.opencv.org/t/python3-opencv-versus-opencv-python/14405/3 "2023-08-30T19:03:45Z")

</div>

Thanks. In that case, for using python with opencv, is installing opencv-python through pip the only requirement (given they are statically linked with OpenCV in the wheel).

Unless I am missing something, the Opencv python [documentation](https://docs.opencv.org/4.x/d2/de6/tutorial_py_setup_in_ubuntu.html) only mentions about python3-opencv and not about installing opencv-python using pip. So was wondering what the right approach is.

---

<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:** [August 31, 2023, 6:04am UTC](https://forum.opencv.org/t/python3-opencv-versus-opencv-python/14405/4 "2023-08-31T06:04:29Z")

</div>

> [@kir](#):
>
> the Opencv python [documentation](https://docs.opencv.org/4.x/d2/de6/tutorial_py_setup_in_ubuntu.html)

disregard that entire article. that article is stale.

> It is quite easy. But there is a problem with this. Apt repositories may not contain the latest version of OpenCV always. For example, at the time of writing this tutorial, apt repository contains 2.4.8 while latest OpenCV version is 3.x

it doesn’t even say when it was written. probably over 5 years ago. “articles” in the OpenCV docs are usually written once by someone who is _not_ a core developer, then forgotten about.

---

<div class="post-metadata">

**Author:** ![kir](https://avatars.discourse-cdn.com/v4/letter/k/ea666f/32.png) [@kir](https://forum.opencv.org/u/kir)\
**Post date:** [August 31, 2023, 2:08pm UTC](https://forum.opencv.org/t/python3-opencv-versus-opencv-python/14405/5 "2023-08-31T14:08:56Z")

</div>

Thanks for the responses !

---

<div class="post-metadata">

**Author:** ![matan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/matan/32/1521_2.png) [@matan](https://forum.opencv.org/u/matan)\
**Post date:** [June 2, 2024, 4:46pm UTC](https://forum.opencv.org/t/python3-opencv-versus-opencv-python/14405/6 "2024-06-02T16:46:39Z")

</div>

So, is the OS installed OpenCV just a certain version of OpenCV’s CPP core, which the python opencv python package is linking to at runtime, or does the python opencv package bring in all of OpenCV self-contained such that it does not ever link to the OS installed OpenCV?

---

<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:** [June 2, 2024, 6:16pm UTC](https://forum.opencv.org/t/python3-opencv-versus-opencv-python/14405/7 "2024-06-02T18:16:46Z")

</div>

> [@matan](#):
>
> So, is the OS installed OpenCV just a certain version of OpenCV’s CPP core, which the python opencv python package is linking to at runtime,

no, that is not the case.

> [@matan](#):
>
> or does the python opencv package bring in all of OpenCV self-contained such that it does not ever link to the OS installed OpenCV?

yes, that is the case.
