# Importing the library

**URL:** <https://forum.opencv.org/t/importing-the-library/6328>\
**Category:** Python\
**Tags:** vscode\
**Created:** [November 20, 2021, 2:45pm UTC](https://forum.opencv.org/t/importing-the-library/6328 "2021-11-20T14:45:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chopan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/chopan/32/3814_2.png) [@Chopan](https://forum.opencv.org/u/Chopan)\
**Post date:** [November 20, 2021, 2:45pm UTC](https://forum.opencv.org/t/importing-the-library/6328/1 "2021-11-20T14:45:52Z")

</div>

Hi,  
im working in vs code and i have to import the library as cv2.cv2 for intellisense to autocomplete the code. But im working with a team and they all just use cv2 to import it. Can you help me figure out how to make so that importing is as cv2 makes intellisense work.  
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:** [November 20, 2021, 6:00pm UTC](https://forum.opencv.org/t/importing-the-library/6328/2 "2021-11-20T18:00:31Z")

</div>

present how you installed everything. mention every “complication”. that means, if you used _any_ virtual envs or dockers or WSL or **any of that** , you need to say so. that also includes **anything** I am not explicitly asking about. if your computer is cursed, I can’t anticipate that.

also… please look on the internet. you aren’t the first with that problem. solutions are out there. you’re only making me google for you. that’s a waste of everyone’s time.

---

<div class="post-metadata">

**Author:** ![Chopan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/chopan/32/3814_2.png) [@Chopan](https://forum.opencv.org/u/Chopan)\
**Post date:** [November 20, 2021, 8:40pm UTC](https://forum.opencv.org/t/importing-the-library/6328/3 "2021-11-20T20:40:26Z")

</div>

I’m sorry for the lack of information.  
I’m working on ubuntu 20.04. i’m using conda, i have created a virtual enviroment using python 3.10. I have installed numpy and opencv-python using pip. I’ve created the path to the site-packages folder as follow:

```auto
"python.autoComplete.extraPaths": [
        "/home/chopan/miniconda3/envs/open-cv/lib/python3.10/site-packages",
        "/home/chopan/miniconda3/envs/open-cv/lib/python3.10/site-packages/cv2"]

```

Every thing works perfectly fine. But i have to include the opencv library using the following line:

```auto
import cv2.cv2 as cv

```

for the library to work properly. if i don’t do that the interpreter won’t find the library. But i work with and the import it as:

```auto
import cv2 as cv

```

and it works for them like that.

my question is how can a make it so i can import the library as all my team member do? I am sorry if that is a trivial question but i’m new to python and opencv.  
thanks
