DLL Load Failed (Open cv2) - python

i tried many solutions for that error but didn't solved
ImportError: DLL load failed while importing cv2: The specified module could not be found.

Make sure you have installed right versions. Follow the below link for the compatible versions installed.
https://www.tensorflow.org/install/source_windows#gpu
https://www.drdataking.com/post/install-gpu-support-to-tensoflow-on-windows/
I was too getting similar issue:
DLL load failed while importing _multiarray_umath: The specified module could not be foundDLL load failed while importing _multiarray_umath: The specified module could not be found
Solution was the environment variable path was not set properly. Please find the image below:
Solution

in python 3.8 i fixed a similar error when compiling with cxfreeze cv2 dll load failed ,
the problem was that i had another version of python 3.6 installed and although environment variable path from python 3.8 was first, cxfreeze still loaded opencv from python 3.6 causing the error in the output file,
I fixed it by moving python 3.6 to another location so not get detected by cxfreeze, be careful with the environments variable path if you have other versions of python installed when compiling.
try miniconda with Python 3.6 is more stable ,
https://repo.continuum.io/miniconda/
Miniconda3-4.5.4 was the last Python 3.6 miniconda package.
Try to Install other versión of opencv
pip install opencv-contrib-python
Install Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019
https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
Install media feature pack only if you use win10
https://www.microsoft.com/en-us/software-download/mediafeaturepack
this article may interest you
DLL load failed error when importing cv2

Related

Why Python fatal error occurs after OpenCV build?

I've built OpenCV 4.5.5 on Windows with Cmake / VS19. I did PATH and copy&paste .pyd file as well. Now I am getting the Fatal Python error, I have no clue what is the problem.
Fatal Python error: _PyInterpreterState_GET: the function must be called with the GIL held, but the GIL is released (the current Python thread state is NULL)
Python runtime state: unknown
The reason I built opencv myself was to use some library I wanted to use which requires the Nonfree OpenCV module. So I removed the OpenCV package which I installed by pip install opencv-python. Then I followed Cmake build instructions with OpenCV/OpenCV-contrib source. Is there any possibility that I installed the OpenCV module before?
I've tried to modify / repair Python but no luck. When I import other library (for example : Numpy) it works fine. Any suggestions?

PostgreSQL PL/Python could not load library plpython3u

I am trying to install the PL/Python extension for PostgreSQL. Executing the command CREATE EXTENSION plpython3u; results into the following error message:
ERROR: could not load library "C:/Program Files/PostgreSQL/11/lib/plpython3.dll": The specified module could not be found.
I have:
double checked that the C:\Program Files\PostgreSQL\11\lib\plpython3.dll is present
read the instruction bundled with my installation (doc/installation-notes.html). They mentioned the python version they have used to compile the binaries (Python 3.6.5)
set the PATH to python version 3.6.8 (Python36_64, Python36_64/Scripts)
downloaded embeddable Python version 3.6.5 added this version to the PATH
double checked with both versions 3.6.8 and 3.6.5 that they were found by using this dependency checker Dependencies in both cases it has found the python36.dll
tried 32 bit version of python but the Dependencies checker did not find the python dll so assuming it is using 64 bit.
reopened powershell after each change I did to the PATH variable.
This is my PATH:
I am running:
version
------------------------------------------------------------
PostgreSQL 11.4, compiled by Visual C++ build 1914, 64-bit
(1 row)
Windows 10 Pro 64bit
PostgreSQL EnterpriseDB installation
I was able to resolve this issue by using a workaround by copying the python36.dll (3.6.8) into the system32 folder.
First,you have to verify that python was installed correctly without any bugs,while installing python we have to choose customize installation instead of giving Install now,follow this method this will useful..

Scipy: C Callback DLL failing to Load

I have been attempting to install scipy such that I can run it from IDLE. I have installed :
the proper numpy wheel via pip
the proper scipy wheel via pip
the visual C++ redistributable
I am using python 3.6.xx 32 bit and windows 10 pro. I have uninstalled and reinstalled everything multiple times. I am unsure how to move forward or where to look, it seems to me that the low level callable library has not installed properly given I am getting the error "Import Error: DLL load failed: the specified module could not be found"

Installing PyQt4 on Windows

I have tried installing the binary from lfd.uci.edu/~gohlke/pythonlibs/#pyqt4 for python 3.5 and 3.6 both. Still it is not working. Now it throws DLL error. How to fix it?
builtins.ImportError: DLL load failed: The specified module could not be found
A quick look inside the .whi for Python 3.6 with dependency walker suggests that the package requires msvcp140.dll and vcruntime140.dll which are part of the Visual C++ Redistributable for Visual Studio 2015

scipy.linalg DLL load failed (Python 3.4, Windows 8.1) [duplicate]

I have been trying to install Scipy onto my Python 3.5 (32-bit) install on my Windows 7 machine using the pre-built binaries from:
http://www.lfd.uci.edu/~gohlke/pythonlibs
I have, in order, installed the following libraries
numpy‑1.10.1+mkl‑cp35‑none‑win32.whl
scipy‑0.16.1‑cp35‑none‑win32.whl
Then, when trying to use the installed packages I get the following erros
from scipy import sparse
< ... Complete error trace ommitted ... >
packages\scipy\sparse\csr.py", line 13, in <module>
from ._sparsetools import csr_tocsc, csr_tobsr, csr_count_blocks, \
ImportError: DLL load failed: The specified module could not be found.
However, if i follow the same process for Python 3.4 replacing the installers with:
numpy‑1.10.1+mkl‑cp35‑none‑win32.whl
scipy‑0.16.1‑cp35‑none‑win32.whl
Everything seems to work. Are there additional dependencies or install packages that I am missing for the Python 3.5 install?
Make sure you pay attention to this line from the link you provided:
Many binaries depend on NumPy-1.9+MKL and the Microsoft Visual C++
2008 (x64, x86, and SP1 for CPython 2.6 and 2.7), Visual C++ 2010
(x64, x86, for CPython 3.3 and 3.4), or the Visual C++ 2015 (x64 and
x86 for CPython 3.5) redistributable packages.
Download the corresponding Microsoft Visual C++ Redistributable Package which should be this one based on your description.
I had a similar problem, can't recall the exact issue, and I download the one for my system and it worked fine. Let me know otherwise.
Possibly helpful: trying to pip install scipy-0.18.0rc2-cp35-cp35m-win_amd64.whl (downloaded from http://www.lfd.uci.edu/~gohlke/pythonlibs/) on 64-bit windows 7 with Python 3.5 failed with a "file does not exist/not a valid wheel filename" error.
From various hints obtained from here and elsewhere I found that renaming the file to: scipy-0.16.1-cp35-none-win_amd64.whl allowed it to install.
Pull up the command window (search for it in the start button), then enter
pip install numpy
and
pip install scipy‑0.16.1‑cp35‑none‑win32.whl
then it should let you know in the command window if it was successfully downloaded, if you have python 3.5.
I had a question that turned out to be a duplicate of this one here:
ImportError: DLL load failed: when importing statsmodels
I actually solved this and other issues related to installing packages (such as statsmodels) by using Anaconda installer for Python 3.5.

Categories