Hello. I am trying to package a standalone exe that uses Gekko
Optimization. Pyinstaller successfully compiles the application but it
fails to run completely through the script. As a test case, I have used
the HS 71 Benchmark example directly from the Gekko Optimization website
(https://gekko.readthedocs.io/en/latest/examples.html). I have modified the
problem to run locally (instead of on gekko servers) and it runs
successfully within spyder.
I have modified the .spec file to include hidden imports from Gekko (below)
-------------------------------------------------------------------
# -*- mode: python ; coding: utf-8 -*-
block_cipher = None
a = Analysis(['GekkoTest.py'],
pathex=['C:\\Users\\jcm\\.spyder-py3\\OTSG'],
binaries=[],
datas=[],
hiddenimports=['gekko'],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='GekkoTest',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True )
-------------------------------------------------------------------
Upon running the script I get errors related to results.json not found.
Long story short, the python executable is not creating the problem's
solution files. I am not completely familiar, but I believe Gekko
optimization solves problems in fortran/C and writes to json files which
are then loaded back into python. It is likely that pyinstaller is not
wrapping up some of the necessary files related to these other languages.
Does anyone know a way to make Gekko Optimization work correctly using
pyinstaller?
Thanks in advance for suggestions.
--
You received this message because you are subscribed to the Google Groups
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/pyinstaller/2ac08348-636c-41c9-b85c-87b2549249b0n%40googlegroups.com.