From 9fca6ab837657429a31f7e4c83416bdcedd91385 Mon Sep 17 00:00:00 2001 From: boltgolt Date: Wed, 2 Sep 2020 17:14:05 +0200 Subject: [PATCH] Moved cv2 import after dlib import --- src/cli/add.py | 4 +++- src/cli/test.py | 2 +- src/compare.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/cli/add.py b/src/cli/add.py index 27b1364..112eacd 100644 --- a/src/cli/add.py +++ b/src/cli/add.py @@ -7,7 +7,6 @@ import sys import json import configparser import builtins -import cv2 import numpy as np from recorders.video_capture import VideoCapture @@ -22,6 +21,9 @@ except ImportError as err: print("pip3 show dlib") sys.exit(1) +# OpenCV needs to be imported after dlib +import cv2 + # Get the absolute path to the current directory path = os.path.abspath(__file__ + "/..") diff --git a/src/cli/test.py b/src/cli/test.py index dbcd06d..c62fcef 100644 --- a/src/cli/test.py +++ b/src/cli/test.py @@ -5,8 +5,8 @@ import configparser import os import sys import time -import cv2 import dlib +import cv2 from recorders.video_capture import VideoCapture # Get the absolute path to the current file diff --git a/src/compare.py b/src/compare.py index 7dc640f..d0ea5ea 100644 --- a/src/compare.py +++ b/src/compare.py @@ -14,8 +14,8 @@ import sys import os import json import configparser -import cv2 import dlib +import cv2 import datetime import snapshot import numpy as np