riklaunim / ximea-examples

Ximea cameras Python API usage examples
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

ERROR: GUI_run.exe\ximea\libs\64bit\xiArrOps64.dll not found #1

Closed Shuozhi closed 1 year ago

Shuozhi commented 1 year ago

I am a junior software engineer. I have tried 'py2exe' & 'pyinstaller' to release my XIMEA_PyQt5_GUI_Python_project as an exe document.

But these two method ware all failed by "FileNotFoundError: Could not find module 'C:\Users\Lenovo\Desktop\my_project_name\dist\GUI_run.exe\ximea\libs\64bit\xiArrOps64.dll'"

Do you know why?

Looking forward to your reply

riklaunim commented 1 year ago

When you build an exe from a Python app you have to list all dependencies (DLLs) so this includes Ximea DLLs here.

Shuozhi commented 1 year ago

All of the package are in the document " my_project_name\venv\Lib\site-packages". The Ximea DLLs are in "my_project_name\venv\Lib\site-packages\ximea\libs\64bit ". Is that right ?

riklaunim commented 1 year ago

py2exec will not add them manually, check the configuration options for it. shared DLLs must be explicitly listed there.

Shuozhi commented 1 year ago

Thank you, I will try your suggestion. I am sorry that I don't konw how to list dependencies in "Edit Configuration" option.

Shuozhi commented 1 year ago

I Guess my exe didn't include the XimeaCamer Driver. So the error show "not found ximea\libs\64bit\xiArrOps64.dll" Do you think so? but how to add the driver into the exe document?

riklaunim commented 1 year ago

The configuration used by py2exe has to have a list of DLLs to include. Include this one and others as neede.

Shuozhi commented 1 year ago

Can you give me a detail tutorial about setting "the configuration"