# Best way to setup python OpenCV for development on Arch Linux?

**URL:** <https://forum.opencv.org/t/best-way-to-setup-python-opencv-for-development-on-arch-linux/6265>\
**Category:** Python\
**Tags:** build, viz\
**Created:** [November 17, 2021, 2:10pm UTC](https://forum.opencv.org/t/best-way-to-setup-python-opencv-for-development-on-arch-linux/6265 "2021-11-17T14:10:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dshem](https://avatars.discourse-cdn.com/v4/letter/d/f6c823/32.png) [@dshem](https://forum.opencv.org/u/dshem)\
**Post date:** [November 17, 2021, 2:10pm UTC](https://forum.opencv.org/t/best-way-to-setup-python-opencv-for-development-on-arch-linux/6265/1 "2021-11-17T14:10:01Z")

</div>

Hello!

I need to use some modules that are not included in the PyPi version of OpenCV, fort instance Viz3D. I’ve been tearing my hair out trying to figure out a proper setup and I’m still confused.

The `opencv` package in the arch repos is great, but the `python-opencv` is just a shared object so no way of getting intellisense in VS Code.

`conda opencv` is heavy as hell and does the same thing: no intellisense.

`pip opencv-contrib-python` has intellisense but not compiled with Viz3D and is messing up with system-installed Qt5 which leads to segfaults at the moment.

I’d like to keep my system clean and use a virtualenv. For now, I’m using `pipenv` with `--site-packages` option to get access to the arch version of `python-opencv`.

Is there a way to get all the good stuff? Intellisense + Viz3D + in a virtualenv? Or should I give up and switch to C++ 😬?

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [November 17, 2021, 2:24pm UTC](https://forum.opencv.org/t/best-way-to-setup-python-opencv-for-development-on-arch-linux/6265/2 "2021-11-17T14:24:37Z")

</div>

> [@dshem](#):
>
> I need to use some modules that are not included in the PyPi version of OpenCV, for instance Viz3D

this unfortunately means: you have to [build from src](https://github.com/opencv/opencv_contrib/blob/4.x/README.md)  
since Viz3D draws most functionality from VTK, you need to have that installed before.

(but hopefully, you can get around the qt issue like that, by either using your local qt or switching to gtk)

---

<div class="post-metadata">

**Author:** ![dshem](https://avatars.discourse-cdn.com/v4/letter/d/f6c823/32.png) [@dshem](https://forum.opencv.org/u/dshem)\
**Post date:** [November 17, 2021, 4:01pm UTC](https://forum.opencv.org/t/best-way-to-setup-python-opencv-for-development-on-arch-linux/6265/3 "2021-11-17T16:01:35Z")

</div>

> [@berak](#):
>
> this unfortunately means: you have to [build from src](https://github.com/opencv/opencv_contrib/blob/4.x/README.md)

Does building from source provide python bindings and the required files for intellisense?

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [November 17, 2021, 4:05pm UTC](https://forum.opencv.org/t/best-way-to-setup-python-opencv-for-development-on-arch-linux/6265/4 "2021-11-17T16:05:15Z")

</div>

i’ve no idea, what is required for intellisense, but yes it will build python bindings
