ModuleNotFound Error
shuntera opened this issue · comments
I tried to run this from a Jupyter Notebook and am getting module not found on utils.detect and utils.shaders.
Where do those modules come from?
ModuleNotFoundError Traceback (most recent call last)
in
5 import numpy as np
6 import cv2
----> 7 from utils.detect import get_face, get_marks
8 from utils.shaders import img_vertex, img_fragment
9
ModuleNotFoundError: No module named 'utils.detect'
utils is the folder in the same directory as the main program. 'utils.detect' imports from utils/detect.py.
If you are using python2, then you should consider adding an empty python file by the name __init__
.py (double underscored init) in the utils folder to fix this.
There's an earlier error, so it looks like it can't find OpenCV
Collecting opencv
Could not find a version that satisfies the requirement opencv (from versions: )
No matching distribution found for opencv
Try this:
pip install opencv-python==2.4.9
Tried it:
Could not find a version that satisfies the requirement opencv-python==2.4.9 (from versions: 3.1.0.4, 3.1.0.5, 3.2.0.6, 3.2.0.7, 3.2.0.8, 3.3.0.9, 3.3.0.10, 3.3.1.11, 3.4.0.12, 3.4.0.14, 3.4.1.15, 3.4.2.16, 3.4.2.17, 3.4.3.18, 3.4.4.19, 3.4.5.20, 4.0.0.21)
No matching distribution found for opencv-python==2.4.9
check out these links:
for Ubuntu: https://docs.opencv.org/3.4/d2/de6/tutorial_py_setup_in_ubuntu.html
for Windows: https://docs.opencv.org/3.2.0/d5/de5/tutorial_py_setup_in_windows.html