mediapipe: AttributeError: module 'mediapipe' has no attribute 'solutions'
Has anyone had this error when importing the mediapipe library?
AttributeError: partially initialized module ‘mediapipe’ has no attribute ‘solutions’(most likely due to a circular import)
import cv2
import mediapipe as mp
mp_drawing = mp.solutions.drawing_utils
mp_face_mesh = mp.solutions.face_mesh
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 11
- Comments: 38
It turns out that as I am very smart, my file had the same name as the library, now that I change it, it works as it should
Just change your file name. Thanks .
my file was named mediapipe.py, but that name is the same as the library, so I had to change the name to something else
Yes! Just change your folder’s name. Maybe you have a folder in your working directory which has the same like the dependency (mediapipe)
Le ven. 14 avr. 2023 à 16:43, StratosphericD @.***> a écrit :
@DevanshYadav07 the main file, where you import mediapipe
My file name is BalloonPwop.py, and same problem…
my file name was different, but I was getting this error again and again, then I figured out that in that directory I had a folder named mediapipe. I deleted it and the error resolved. so other than the file name be careful about any other file or folder with same name.