etiennedub / pyk4a

Python 3 wrapper for Azure-Kinect-Sensor-SDK
MIT License
289 stars 81 forks source link

Cannot load depthengine in .exe #145

Closed euijaebilly closed 3 years ago

euijaebilly commented 3 years ago

i try to make exe file with azure kinect there are occured this error message

image

how can i solve this problem?

lpasselin commented 3 years ago

There should be logs in a console. K4AExceptions are usually verbose.

Without more information there is nothing I can do. Please provide more information if you want more help.

Maybe you should practice using pyk4a in a small script. See the examples provided.

euijaebilly commented 3 years ago

image

euijaebilly commented 3 years ago

i try to run this tiny code for test ` import cv2 import pyAzKinct

camera1 = pyAzKinct.transfer_img(0, "master")

cimg1,dimg1,_ = pyAzKinct.get_images(camera1) # get image1 from camera1

cv2.imshow("test1",cimg1)

cv2.waitKey() ` and it has same problem...

lpasselin commented 3 years ago

PyAzKinct is not the library in this repository... We develop pyk4a here.

lpasselin commented 3 years ago

But still, read the error code. You must install the depthengine properly.

euijaebilly commented 3 years ago

well pyAzKinct is just a python script for using some features of pyk4a. So, basically, erros are occurring in pyk4a, and if it is caused by depthEngine, how can I install it properly?

lpasselin commented 3 years ago

Can you share pyAzKinct source code?

euijaebilly commented 3 years ago

pyAskinct.txt

just simple code

lpasselin commented 3 years ago

Did you try to figure out why the depthengine is not found?

euijaebilly commented 3 years ago

Did you try to figure out why the depthengine is not found?

Yes. I tried finding depthEngine_2_0.dll from "C:\Program Files\Azure Kinect SDK v1.4.1\sdk\windows-desktop\x86\release\bin" and placing it in the same path as the .exe file and running it, or adding to the environment variable, but it doesn't work.

There were no problems when running in Python. My guess is that it doesn't find the correct path as it converts to .exe.

euijaebilly commented 3 years ago

Did you find any solution?

You are seem really busy now.....

lpasselin commented 3 years ago

I have no idea how .exe work in python. For example see here there are specific instructions to add .dll with pyinstaller. https://pyinstaller.readthedocs.io/en/stable/spec-files.html#adding-data-files

This is not really a pyk4a problem. Maybe you should look into the library used to create your .exe. How do they handle the .dll ?

Otherwise you could look into adding the depthengine dll manually: https://github.com/etiennedub/pyk4a/blob/master/pyk4a/win32_utils.py#L11

lpasselin commented 3 years ago

I'll close as this is most likely an error caused by bad configuration of the executable generating tool.