mirror of
https://github.com/initialcommit-com/git-sim.git
synced 2026-04-26 19:15:51 +03:00
[GH-ISSUE #19] Error importing cv2 on Windows 10 #15
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/git-sim#15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tonnydourado on GitHub (Jan 25, 2023).
Original GitHub issue: https://github.com/initialcommit-com/git-sim/issues/19
I installed
ffmpeg(manually) andmanim, and they both work, but when I try to rungit-sim merge develop, I get an error about importing cv2:Installing
git-simcorrectly installed opencv-python-headless, from what I see in the output of pip install git-sim:As asked by the contributing guidelines:
@initialcommit-io commented on GitHub (Jan 26, 2023):
Hi there @tonnydourado sorry for the delay. This may be a silly question, but is your virtual environment activated when you run your git-sim command?
Also what happens if you just run the Python interpreter and run
import cv2? With and without your venv activated.@tonnydourado commented on GitHub (Jan 26, 2023):
No worries, mate! Answering your questions: I'm pretty darn sure the virtualenv was activated, but I'll double check tomorrow at work. I'll also try to just import cv2 in the virtualenv. Without it, I'm sure it will give an impor error, because I install almost nothing on the global namespace.
For what is worth, I tried one of the manin getting started examples, the create circle one, and it worked. The default player didn't play the video, because it's a company machine and I do not think IT has installed any codecs, but ffplay played without issues.
@initialcommit-io commented on GitHub (Jan 27, 2023):
@tonnydourado Hi again! Were you able to test this out?
@tonnydourado commented on GitHub (Feb 1, 2023):
So, I created a virtualenv from scratch, and this is what I'm getting with
import cv2:I think this is different than the stacktrace from when I opened the issue because before I tried to install open-cv manually. I get the same thing when running git-sim in this fresh venv, just with a couple of extra levels:
import cv2with no virtualenv just raises an import error, as expected:@initialcommit-io commented on GitHub (Feb 1, 2023):
@tonnydourado I found the following post on StackOverflow:
https://stackoverflow.com/questions/52349669/dll-load-failed-when-import-cv2-opencv
It says the issue could be a combination of using Windows 10 N distribution with specific newer versions of OpenCV. It proposes 2 solutions:
Install a Windows feature pack from https://support.microsoft.com/en-us/help/4562569/media-feature-pack-for-windows-10-n-may-2020
Fall back to an earlier version of OpenCV, by uninstalling the existing one from your venv and then try this:
pip install opencv-python-headless=3.3.0.9It would be great if you could test out these options and let me know if one works for you.
@initialcommit-io commented on GitHub (Feb 5, 2023):
@tonnydourado Were you able to test out the suggestions above?
@initialcommit-io commented on GitHub (Feb 8, 2023):
Closing due to inactivity. Feel free to repoen with further details if the above solution didn't work.