Skip to content

using pyinstaller leads to FileNotFoundError: 'dimod.libs' #1353

Description

@robliou

Description

Hello, for testing purposes, I'm trying to use pyinstaller to bundle the dwave- simulated annealing algorithm into a custom pyqt app that I'm building. In this custom app, I can successfully import and run successfully the dwave-sa algorithm. However, when I try to bundle the app and run it using pyinstaller, I get the error:

  File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module
  File "dimod\__init__.py", line 18, in <module>
  File "dimod\__init__.py", line 9, in _delvewheel_init_patch_1_0_1
  File "os.py", line 1118, in add_dll_directory
FileNotFoundError: [WinError 2] 。: 'C:\\Users\\robli\\projects\\python\\final\\pyqt5\\dist\\main\\dimod.libs'
[2848] Failed to execute script 'main' due to unhandled exception!

Steps To Reproduce

  1. create a simple app that uses dwave-sa to run a test function
  2. attempt to bundle this app into an executable file (i.e. .exe) using Pyinstaller

The error occurs when you try to bundle the file using Pyinstaller.

Expected Behavior
This error should not occur when you attempt to bundle the app.

As a side note, looking at the Dimod directory tree, I cannot find this libs folder anywhere. So, not sure why the pyinstaller is even looking for this folder?

Environment

  • OS: Windows 10
  • Python version: 3.10.11

Additional Context
Not sure if this is a dimod error, or a pyinstaller error? Thanks,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions