pyomo icon indicating copy to clipboard operation
pyomo copied to clipboard

PyInstaller fails when upgrading from Pyomo 6.7.1->6.7.3

Open vpranjal opened this issue 1 year ago • 2 comments

Summary

The executable developed via pyinstaller on Pyomo 6.7.3 does not work properly and errors out on execution.

Steps to reproduce the issue

Ran a pyomo 6.7.1 model and tried to build an executable with .spec file (iteratively adding the missing hidden imports). This was successful and the executable worked as expected. However, when upgrading to 6.7.3 on the same project the executable does not work as expected and throws error.

Error Message

When running executable developed with 6.7.3:

File "", line 1360, in _find_and_load File "", line 1331, in _find_and_load_unlocked File "", line 921, in _load_unlocked File "", line 813, in module_from_spec File "pyomo\common\dependencies.py", line 468, in create_module AttributeError: 'NoneType' object has no attribute 'create_module' [10928] Failed to execute script 'main' due to unhandled exception!

Information on your system

Pyomo version: 6.7.1 and 6.7.3 Python version: 3.12 Operating system: Windows 11 How Pyomo was installed (PyPI, conda, source): PyPI Solver (if applicable): Highs

Additional information

Reverting as on now to 6.7.1 for executable developments, however would like this to work on 6.7.3 as well. Tested on two different PCs to ensure this is replicable and the same issue persisted with 6.7.3 (while 6.7.1 worked fine) with PyInstaller.

vpranjal avatar Jun 04 '24 00:06 vpranjal

@vpranjal - could you please check if this is still an issue with the newest release (6.8.2)?

mrmundt avatar Jan 16 '25 14:01 mrmundt

@vpranjal - Is this still an issue with the newest release?

mrmundt avatar Mar 18 '25 22:03 mrmundt