Version guide

Check and update OpenCV version on Windows — version guide 2026

Check your OpenCV version with cv2.__version__, see what the latest release is, update with pip install --upgrade, or downgrade to a specific version.

Check your OpenCV version on Windows

Python
import cv2
print(cv2.__version__)
4.12.0
# Full build info (shows CUDA, modules, etc):
print(cv2.getBuildInformation())
cmd.exe
# From command line:
C:\> python -c "import cv2; print(cv2.__version__)"
4.12.0
# Check pip package version:
C:\> pip show opencv-python
Name: opencv-python
Version: 4.12.0.86

What is the latest OpenCV version?

VersionReleasedpip packageStatus
4.12.0May 2026opencv-python==4.12.0.86Latest stable
4.11.0Jan 2026opencv-python==4.11.0.86Supported
4.10.0Jun 2024opencv-python==4.10.0.84Supported
4.9.0Jan 2024opencv-python==4.9.0.80Update recommended

Check the latest release at github.com/opencv/opencv/releases.

Update OpenCV to the latest version

cmd.exe
# Update to latest:
C:\> pip install --upgrade opencv-python
Successfully installed opencv-python-4.12.0.86
# Update contrib variant:
C:\> pip install --upgrade opencv-contrib-python
# Pin to specific version:
C:\> pip install opencv-python==4.10.0.84
After updating, test your code: new versions occasionally have API changes. Run python -c "import cv2; print(cv2.__version__)" to confirm the update.

Roll back to an older version

cmd.exe
# Downgrade to specific version:
C:\> pip install opencv-python==4.9.0.80
# Check available versions:
C:\> pip index versions opencv-python
Available versions: 4.12.0.86, 4.11.0.86, 4.10.0.84, 4.9.0.80...

Version questions

pip upgrade says "already up to date" but newer version exists
The pip cache may be stale. Try: pip install --upgrade --no-cache-dir opencv-python. Also check you are upgrading in the correct Python environment.
After update, code broke with AttributeError
Some APIs changed between versions. Check the OpenCV changelog at github.com/opencv/opencv/wiki/ChangeLog. Common change: ArUco API changed significantly in 4.7+. To revert: pip install opencv-python==previous.version.
How to check OpenCV version in C++?
In C++ use the preprocessor macros: CV_VERSION (string), CV_MAJOR_VERSION, CV_MINOR_VERSION, CV_SUBMINOR_VERSION. Print with: std::cout << CV_VERSION;

Need to uninstall OpenCV?

Complete removal guide for Python and C++ installations.

Uninstall guide