Setup OpenCV With PyCharm Environment
Last Updated :
03 Feb, 2023
Introduction:
If you love working on image processing and video analysis using python then you have come to the right place. Python is one of the key languages which is used to process videos and images.
Requirements for OpenCV:
- 32- or a 64-bit computer.
- Windows, macOS or Linux.
- Python 2.7, 3.4, 3.5 or 3.6.
PyCharm
PyCharm is a cross-platform IDE used in computer programming specifically for Python. The platform developed by JetBrains is mainly used in code analysis, graphical debugger etc... It supports web development with Django as well as Data Science with Anaconda.

OpenCV
OpenCV (Open Source Computer Vision) is a computer vision library that contains various functions to perform operations on pictures or videos. It was initially built by Intel but later managed by Willow Garag, presently it is managed by Itseez. It is a cross-platform library which available for programming languages apart from python.

Method 1: Steps to import OpenCV on PyCharm (Using Terminal):
1) Go to the terminal option at the bottom of the IDE window.

2) The pip (package manager) can also be used to download and install OpenCV. To install OpenCV, just type the following command:
Python3
pip install opencv-python

3) Now simply import OpenCV in your python program in which you want to use image processing functions.
To check if OpenCV is correctly installed, just run the following program in PyCharm to perform a version check:
Python3
import cv2
print("GeeksForGeeks")
print("Your OpenCV version is: " + cv2.__version__)
Output:
GeeksForGeeks
Your OpenCV version is: 4.4.0

Method 2: Steps to install OpenCV on PyCharm (Using Python Packages):
1) Go to the Python Packages option at the bottom of the IDE window.
Python Package Option
2) Search for "opencv-python" and select the option from PyPI. Click on Install Package.
Opencv-python search result
3) The package is installed and is visible in the "Installed" Tab.
Opencv-Python installed
4) To remove the package, click on the package name (here : opencv-python) from the Installed. Click three dots, select "Delete Package".
Delete opencv-python
Similar Reads
Set up Opencv with anaconda environment If you love working on image processing and video analysis using python then you have come to the right place. Python is one of the major languages that can be used to process images or videos. Requirements for OpenCV and Anaconda - 32- or a 64-bit computer. - For Minicondaâ400 MB disk space. - For
3 min read
Setup Numpy on PyCharm Numpy is a Python library used for scientific calculations. You can work on linear algebra, Fourier transforms, statistical operations, random simulation, and matrices using this library. Apart from that, this library has many more functions to support fast and lengthy calculations. You can use this
2 min read
Setup Pandas on PyCharm If you're working with data analysis or data science in Python, you'll often find yourself using the Pandas library, which provides powerful data structures and data analysis tools. In this article, we'll walk you through the process of setting up Pandas on PyCharm so you can start working with data
1 min read
How to setup Conda environment with Jupyter Notebook ? Anaconda is open-source software that contains Jupyter, spyder, etc that are used for large data processing, data analytics, heavy scientific computing. Anaconda works for R and python programming language. Spyder(sub-application of Anaconda) is used for python. Opencv for python will work in spyder
2 min read
Setup Matplotlib on PyCharm Matplotlib is an effective Python library for producing static, animated, and interactive visualizations in a variety of forms. For data analysis, scientific study, and various other uses, it offers a flexible and effective approach to constructing plots, charts, and graphs. It is built on NumPy arr
5 min read