# Opencv installation in ubuntu python

**URL:** <https://forum.opencv.org/t/opencv-installation-in-ubuntu-python/5825>\
**Category:** Python\
**Tags:** build\
**Created:** [October 24, 2021, 9:48am UTC](https://forum.opencv.org/t/opencv-installation-in-ubuntu-python/5825 "2021-10-24T09:48:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bals](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/bals/32/3553_2.png) [@bals](https://forum.opencv.org/u/bals)\
**Post date:** [October 24, 2021, 9:48am UTC](https://forum.opencv.org/t/opencv-installation-in-ubuntu-python/5825/1 "2021-10-24T09:48:50Z")

</div>

Hallo all,

I have first installed open cv using the source method. The following website refers to that procedure

> **[How to install OpenCV on Ubuntu 20.04 - Two different methods](https://bobcares.com/blog/how-to-install-opencv-on-ubuntu-20-04/?unapproved=18669&moderation-hash=5a356a33f82130e91366a889185b77e2#comment-18669)**
>
> Wondering how to install OpenCV on Ubuntu 20.04? We can help you. Many of our customers use OpenCV for a wide range of applications. Some of which are medical image analysis, surveillance video, detecting and recognizing faces, tracking moving...

Now when I use spyder in anaconda, it could not find the module opencv/cv2. Since I am very new to linux (Ubuntu 20.04), I dont know what to do from here, pls help me what should I do next?

Waiting for ur answer. Thanks in advance

---

<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:** [October 24, 2021, 10:40am UTC](https://forum.opencv.org/t/opencv-installation-in-ubuntu-python/5825/2 "2021-10-24T10:40:29Z")

</div>

don’t do any of that. you don’t need to build OpenCV yourself.

just `pip3 install opencv-python`

---

<div class="post-metadata">

**Author:** ![bals](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/bals/32/3553_2.png) [@bals](https://forum.opencv.org/u/bals)\
**Post date:** [October 24, 2021, 10:51am UTC](https://forum.opencv.org/t/opencv-installation-in-ubuntu-python/5825/3 "2021-10-24T10:51:00Z")

</div>

Thanks for a quick reply

I tried the normal ways. I didnt find luck with that. So I am using spyder from conda. What command should I type in that?

- pip3 install opencv-python in spyder kernel shows me invalid syntax.

- Also the cut and paste procedure of opencv build in anaconda3/lib/python3.8/site-packages is a ryt way to install? I tried and fortunately it didnt show error while running
