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

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

Open
jgv115 opened this issue Oct 10, 2017 · 9 comments
Open

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

jgv115 opened this issue Oct 10, 2017 · 9 comments

Comments

@jgv115
Copy link

jgv115 commented Oct 10, 2017

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 jgv115 changed the title Fail to import due to Fail to import due to a "DLL load failed error" Oct 10, 2017
@r9y9
Copy link
Owner

r9y9 commented Oct 11, 2017

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., opencv/opencv-python#36.

@hjw1007
Copy link

hjw1007 commented Apr 10, 2018

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'

@ghost
Copy link

ghost commented Apr 20, 2018

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

@jmarkow
Copy link

jmarkow commented Jun 28, 2018

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

@r9y9
Copy link
Owner

r9y9 commented Jun 29, 2018

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

Yes. See also:

- set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
- set LIBFREENECT2_BIN=https://github.com/OpenKinect/libfreenect2/releases/download/%LIBFREENECT2_VERSION%/%LIBFREENECT2_ARCHIVE_NAME%.zip
- curl -sLO %LIBFREENECT2_BIN%
- 7z x %LIBFREENECT2_ARCHIVE_NAME%.zip
- set LIBFREENECT2_INSTALL_PREFIX=C:\\projects\\pylibfreenect2\\%LIBFREENECT2_ARCHIVE_NAME%
- set PATH=%LIBFREENECT2_INSTALL_PREFIX%\\bin;%PATH%
.

@yzf123456
Copy link

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!

@xieshenru
Copy link

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

@yangliu666yl
Copy link

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

@MuhammadBilal848
Copy link

** jmarkow**

It worked!!!!!!

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

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

8 participants