pylibfreenect2 icon indicating copy to clipboard operation
pylibfreenect2 copied to clipboard

Fail to import due to a "DLL load failed error"

Open jgv115 opened this issue 7 years ago • 9 comments

I'm running Windows 10. Protonect works fine and I have Microsoft Visual C++ 2015 Redistributable (x64) and (x86) installed.

When I try to import pylibfreenect2, it comes up with the error:

from .libfreenect2 import *
ImportError: DLL load failed: The specified module could not be found.

jgv115 avatar Oct 10 '17 12:10 jgv115

Looks like there are missing DLLs not in PATH and it's not specific problem to pylibfreenect2. While googling I found there are many similar reports. e.g., https://github.com/skvark/opencv-python/issues/36.

r9y9 avatar Oct 11 '17 10:10 r9y9

I also meet this error, I want to know that how to deal with it at last, thanks

from pylibfreenect2 import Freenect2, SyncMultiFrameListener

ImportError: cannot import name 'Freenect2'

hjw1007 avatar Apr 10 '18 12:04 hjw1007

i have the same problem @jgv115, @hjw1007 did you solve it?

ghost avatar Apr 20 '18 11:04 ghost

Hi all, I ran into the same problem and was able to fix it through copying all of dlls generated in the libfreenect2 build (in build/install/bin by default in the libfreenect2 source directory),

freenect2.dll
glfw3.dll
libusb-1.0.dll
turbojpeg.dll

to my miniconda3 path,

C:\Users\<username>\AppData\Local\Continuum\miniconda3

Alternatively I believe you could append the path to the dlls to your path variable,

set path=%PATH%;C:\libfreenect2\build\install\bin

jmarkow avatar Jun 28 '18 18:06 jmarkow

Alternatively I believe you could append the path to the dlls to your path variable,

Yes. See also: https://github.com/r9y9/pylibfreenect2/blob/78b8748ea356d8ed61d862e24e8eab934d94d6e3/appveyor.yml#L36-L41.

r9y9 avatar Jun 29 '18 02:06 r9y9

https://github.com/jmarkow i just append the path to the dlls to your path variable,but it dose not work ,so what should i do? and i do not know where to copy all of dlls generated in the libfreenect2 build in my computer? Thank you!

yzf123456 avatar May 18 '19 08:05 yzf123456

C:\Users<username>\AppData\Local\Continuum\miniconda3

I cannot do "from pylibfreenect2 import Freenect2", where is miniconda3 path"C:\Users<username>\AppData\Local\Continuum\miniconda3"?I cannot find it.@jmarkow

xieshenru avatar Jun 12 '19 03:06 xieshenru

Hi all, I ran into the same problem and was able to fix it through copying all of dlls generated in the libfreenect2 build (in build/install/bin by default in the libfreenect2 source directory),

freenect2.dll
glfw3.dll
libusb-1.0.dll
turbojpeg.dll

to my miniconda3 path,

C:\Users\<username>\AppData\Local\Continuum\miniconda3

Alternatively I believe you could append the path to the dlls to your path variable,

set path=%PATH%;C:\libfreenect2\build\install\bin

thanks a lot

yangliu666yl avatar Jun 25 '19 01:06 yangliu666yl

** jmarkow**

It worked!!!!!!

I found the "F:\vcpkg\installed\x64-windows\bin" and added it to my PATH.

MuhammadBilal848 avatar Feb 20 '24 09:02 MuhammadBilal848