Hi

Title: A module that comes with Python, doesn´t register.

This is the error message:

%Run 'open cv - tot.py'
Traceback (most recent call last):
File "C:\Users\Audun Nilsen\open cv - tot.py", line 1, in <module>
import cv2 # OpenCV for image processing
ModuleNotFoundError: No module named 'cv2'

I double-checked to see if I had installed it, and ... Python 3.12. Its there.

This is the guide I´m trying to get through:

https://finnstats.com/2024/01/17/python-for-image-based-data-mining/

It says its supposed to be included in Python, so.. I don´t understand.

I tried installing python 3.12 and had the same problem. I typically wait a bit before installing the latest and greatest because I have found it can take a while before packages are upgraded to be compatible (usually wxpython). I was able to install the individual packages under python 3.10. I know that the "next to latest and greatest" is 3.11x but I am currently using an old laptop while my regular one is in the shop.

I noticed a failing on the part of the comprehensive guide that you posted the link for. When a project requires the installation of packages, the pip command for that package should ALWAYS be included. For example, the command to install the opencv package was not given and is

pip install opencv-python

The only pip command that was given was for Pytessaract. Seems sloppy to me.

So my suggestion is to punt the 3.12 python and install the 3.11x.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.