导入错误:无法从“deepface.commons”导入名称“距离”(/opt/anaconda3/envs/LIP/lib/python3.9/site-packages/deepface/commons/__init__.py)

问题描述 投票:0回答:1

无法在Python中导入deepface 我目前在 macbook 上使用 Pycharm。

虚拟环境已经激活,但仍然出现以下错误。 有人可以帮我吗?

Python 3.9 Deepface 0.0.89(最新) 张量流版本 2.14.1

虚拟环境已激活。 一切都已安装,但仍无法解决导入错误。

python tensorflow machine-learning anaconda deepface
1个回答
0
投票

最新版本的deepface中距离计算功能移至模块/验证。您现在可以将距离函数用作:

from deepface.modules import verification
distance = verification.find_euclidean_distance(x, y)
© www.soinside.com 2019 - 2024. All rights reserved.