serengil / deepface

A Lightweight Face Recognition and Facial Attribute Analysis (Age, Gender, Emotion and Race) Library for Python
https://bit.ly/deepface-py
MIT License
14.89k stars 2.25k forks source link

Distributionnotfound error when running deepface on Pyto on iPad #355

Closed Shuto-Kinoshita closed 3 years ago

Shuto-Kinoshita commented 3 years ago

Describe the bug I ran the following code on my iPad using the Pyto app and got a distributionnotfound error. When I run the same code on a mac, I can confirm that it works fine. deepface and gdown are already installed with pip.

from deepface import DeepFace
import matplotlib.pyplot as plt
import pandas as pd

img1_path = 'images/img3.jpg'
img2_path = 'images/img7.jpg'

img1 = DeepFace.detectFace(img1_path)
plt.imshow(img1)

img2 = DeepFace.detectFace(img2_path)
plt.imshow(img2)

result = DeepFace.verify(img1_path=img1_path, img2_path=img2_path)

print(result)

img1_path = 'images/img1.jpg'
img1 = DeepFace.detectFace(img1_path)
plt.imshow(img1)

df = DeepFace.find(img_path=img1_path ,db_path = "images/sb/")

df.head()

obj = DeepFace.analyze(img_path = img1_path)

obj

error message Traceback (most recent call last): File "Documents/Df/dpfc.py", line 1, in <module> from deepface import DeepFace File "Documents/Df/deepface/DeepFace.py", line 15, in <module> from deepface.basemodels import VGGFace, OpenFace, Facenet, Facenet512, FbDeepFace, DeepID, DlibWrapper, ArcFace, Boosting File "Documents/Df/deepface/basemodels/VGGFace.py", line 3, in <module> import gdown File "Documents/site-packages/gdown/__init__.py", line 11, in <module> __version__ = pkg_resources.get_distribution("gdown").version File "Pyto.app/site-packages/pkg_resources/__init__.py", line 466, in get_distributio n dist = get_provider(dist) File "Pyto.app/site-packages/pkg_resources/__init__.py", line 342, in get_provider return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0] File "Pyto.app/site-packages/pkg_resources/__init__.py", line 886, in require needed = self.resolve(parse_requirements(requirements)) File "Pyto.app/site-packages/pkg_resources/__init__.py", line 772, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'gdown' distribution was not found and is required by the application

iPad(8th Generation) iOS 14.5.1 Pyto

serengil commented 3 years ago

exception message is clear. One of deepface dependency - gdown - is required but it does not exist for pyto.