最近在使用mediapipe
这个报错可能是因为python版本不对,我原本的版本是3.7,
然后在代码中
import mediapipe.tasks.python as tasks
报错
ImportError: cannot import name 'python' from 'mediapipe.tasks.python' (/dica_env/lib/python3.8/site-packages/mediapipe/tasks/python/__init__.py)
在官网查到
Supported platforms and versions
Building applications with MediaPipe Tasks requires the following development environment resources:
- Python
- Linux/Mac/Windows: Python 3.8 - 3.11
发先自己的python版本不对,新建了一个python3.9的环境,导入成功