Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named 'cv2' #34

Closed
yhqqxq opened this issue Jul 2, 2024 · 4 comments
Closed

No module named 'cv2' #34

yhqqxq opened this issue Jul 2, 2024 · 4 comments

Comments

@yhqqxq
Copy link

yhqqxq commented Jul 2, 2024

Traceback (most recent call last):
File "G:\AI\ZHB\MOFA-Video\MOFA-Video-Hybrid\aniportrait\audio2ldmk.py", line 6, in
import cv2
ModuleNotFoundError: No module named 'cv2'

opencv-python已经装了,却提示缺少cv2,请问这个如何解决?

@MyNiuuu
Copy link
Owner

MyNiuuu commented Jul 3, 2024

You can try pip install opencv-python-headless

@yhqqxq
Copy link
Author

yhqqxq commented Jul 3, 2024

微信截图_20240703145459

opencv-python-headless has been installed, but the same error occurs.

@MyNiuuu
Copy link
Owner

MyNiuuu commented Jul 3, 2024

I haven't encountered this issue before, but I find that most solutions on the internet suggests that you can uninstall opencv-python (and opencv-python-headless) and re-install it with different commands: a, b. Hope these can help you!

@zishen-ucap
Copy link

Traceback (most recent call last): File "G:\AI\ZHB\MOFA-Video\MOFA-Video-Hybrid\aniportrait\audio2ldmk.py", line 6, in import cv2 ModuleNotFoundError: No module named 'cv2'

opencv-python已经装了,却提示缺少cv2,请问这个如何解决?

如果你是opencv进的话,那么下面终端也要切换下环境

@MyNiuuu MyNiuuu closed this as completed Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants