简体   繁体   English

没有名为 cv cv2 的模块 没有找到与 mediapipe 匹配的分布

[英]No module named cv cv2 No matching distribution found for mediapipe

I am using windows我正在使用 windows

    import cv2
ModuleNotFoundError: No module named 'cv2'

how to fix it?如何解决?

I tried我试过了

pip install opencv-contrib-python
pip3 install opencv-python
pip install opencv-python

etc etc, still did not work等等等等,仍然没有用

update: cv2 is fixed, but I am having a problem on mediapipe.更新:cv2 已修复,但我在 mediapipe 上遇到问题。 it's showing like this:它显示如下:

ERROR: Could not find a version that satisfies the requirement mediapipe (from versions: none)
ERROR: No matching distribution found for mediapipe
WARNING: You are using pip version 21.3.1; however, version 22.3.1 is available.
You should consider upgrading via the 'E:\python\Scripts\python.exe -m pip install --upgrade pip' command.

my python version is 3.11.0我的 python 版本是 3.11.0

It seems the install of cv2 goes nicer with system install: apt install python3-opencv似乎 cv2 的安装与系统安装一起进行得更好: apt install python3-opencv

I think, with Python 3.11.0 we can't install mediapipe .我认为,使用Python 3.11.0我们无法安装mediapipe What I suggest you is to try lowering your Python version to 3.7.0 and install mediapipe .我建议您尝试将 Python 版本降低到3.7.0并安装mediapipe If you face the same issue then try installing mediapipe==0.8.9如果您遇到同样的问题,请尝试安装mediapipe==0.8.9

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM