Quantcast
Viewing all articles
Browse latest Browse all 1306

Python • Re: Unable to import cv2 on OpenCV installation

Sorry about the delay. I've been working hard on my end trying to figure out what the problem is. I have installed virtualenv but when I call

Code:

python -m venv env
it returns error

Code:

/usr/bin/python: No module named venv
So B.Goode, I did follow along with your steps exactly but it failed at the point indicated. I sure would appreciate your help moving forward.

As a response to this error, I tried reinstalling virtualenv in the project directory. It said it was already there. So I installed it with flag

Code:

pip3 install --ignore-installed virtualenv
It reinstalled virtualenv fine then but it still doesn't recognize venv, failing with the error above.

I also tried running all of the various Python installations available in Thonny at Tools->Options->Interpreter ->Python executable, with no success.

At this point, I can only think to reinstall Bookworm. But I don't want to do that because there are files on the drive that I need that I have been unable to copy off to another hard drive due to some security issue. And yes, I tried it with sudo.

Also, I'd like to get this working from a file, not from a command line. Sample file attached. Rename it to a .py file because I had to get it through the filters.

Statistics: Posted by DevGuy — Tue Feb 11, 2025 12:43 am



Viewing all articles
Browse latest Browse all 1306

Trending Articles