模块未找到错误:没有名为'deepface'的模块



我的代码在本地系统中运行良好,然后我将决定将代码转移到服务器中。我只是创建了一个蟒蛇环境并安装了所有东西,但现在它没有给出模块错误。一切都是一样的,即使是python版本,文件也存在于文件夹中。我在我的本地系统上测试了一下,没有任何错误。

Tracback

Traceback (most recent call last):
File "Ensemble-Face-Recognition.py", line 21, in <module>
from deepface import DeepFace
ModuleNotFoundError: No module named 'deepface'

python文件代码

from pandas.core.frame import DataFrame
import lightgbm as lgb
import more_itertools
import pandas as pd
import numpy as np
import itertools
from os import cpu_count
from sklearn.metrics import confusion_matrix, accuracy_score, roc_curve, auc
import matplotlib.pyplot as plt
import json
import os
import gc
from tqdm import tqdm
from deepface import DeepFace
from deepface.basemodels import VGGFace, OpenFace, Facenet, FbDeepFace, DeepID
from sklearn.model_selection import train_test_split
from sklearn.metrics import confusion_matrix, accuracy_score, roc_auc_score, roc_curve

您必须首先激活您的环境,然后安装所需的deepface包。当虚拟环境被激活时,你必须运行上面的程序。

  1. C: YOUR_USER Desktop&gt用户;激活YOUR_ENV
  2. (YOUR_ENV) C:UsersYOUR_USER Desktop>pip install deepface
  3. (YOUR_ENV) C:UsersYOUR_USER Desktop>皮普冻结
  4. (YOUR_ENV) C:UsersYOUR_USER Desktop>python Ensemble-Face-Recognition.py

一旦你激活了你的环境,那么当你调用pip freeze时,你应该看到deepface

相关内容

  • 没有找到相关文章

最新更新