Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: DLL load failed: The specified module could not be found #3

Open
kino-ngoo opened this issue Aug 8, 2018 · 7 comments
Assignees

Comments

@kino-ngoo
Copy link
Owner

import cv2

ImportError: DLL load failed: The specified module could not be found

And before this ImportError what I cmd

pip install opencv-python
pip install opencv-contrib-python

And the enviroment

$ python --version
Python 3.6.5 :: Anaconda, Inc.
>>> import keras
Using TensorFlow backend.
>>> print(keras.__version__)
2.2.2
>>> import tensorflow as tf
>>> print(tf.__version__)
1.1.0
@kino-ngoo
Copy link
Owner Author

opencv/opencv-python#36

@kino-ngoo
Copy link
Owner Author

kino-ngoo commented Aug 8, 2018

pip install opencv-python

Thnen

D:\ProgramData\Anaconda3\lib\site-packages\cv2_init_.py in ()
1 import importlib
2
----> 3 from .cv2 import *
4 from .data import *
5

ImportError: DLL load failed: The specified module could not be found.

@kino-ngoo
Copy link
Owner Author

kino-ngoo commented Aug 8, 2018

According to reference issue python - DLL load failed error when importing cv2 - Stack Overflow

Trying

pip install opencv_python‑3.4.2+contrib‑cp36‑cp36m‑win_amd64.whl

and

pip install opencv_python‑3.4.2‑cp36‑cp36m‑win_amd64.whl

Still


ImportError Traceback (most recent call last)
in ()
10 import os.path
11 from keras.models import load_model
---> 12 import cv2
13 from utils.utils import get_yolo_boxes, makedirs
14 from PIL import Image

ImportError: DLL load failed: The specified module could not be found.

@kino-ngoo
Copy link
Owner Author

According to reference issue Windows下Python安装OpenCV详细步骤 - CSDN博客

Download 3.4.2 Win pack from Releases - OpenCV library

And move opencv\build\python\2.7\x86\cv2.pyd to related path \Anaconda3\Lib\site-packages\

Still not ImportError, figure out maybe related to python version.

@kino-ngoo
Copy link
Owner Author

@kino-ngoo
Copy link
Owner Author

Solved.

conda install -c menpo opencv

@kino-ngoo
Copy link
Owner Author

kino-ngoo commented Aug 14, 2018

Face this ImportError in the pass week, and I solved with enter below scripts in the Anaconda Prompt.

conda install -c menpo opencv

And here is my environment:

Python 3.6.5 Anaconda
Keras 2.2.2
tensorflow 1.9.0

For more details:
micky619/holiday-similarity#3

quote
python - DLL load failed: The specified module could not be found - Stack Overflow

@kino-ngoo kino-ngoo self-assigned this Nov 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant