Can you turn your PyHamilton .py script into a .exe?

I’ve gone through the process of creating a very simple PyHamilton script to add checksums to a .HSL file and was wanting to now convert the method script I created into an .EXE so it was easier for my RAs to use it.
While using pyInstaller there is no mention of errors when building upon loading up the .exe I get the following error code when trying to include the needed libraries for pyHamilton.

Traceback (most recent call last):
File “HamiltonMethodDeploymentManager.py”, line 3, in
File “”, line 1007, in _find_and_load
File “”, line 986, in _find_and_load_unlocked
File “”, line 680, in _load_unlocked
File “PyInstaller\loader\pyimod02_importers.py”, line 385, in exec_module
File “G_PyHamilton.py”, line 1, in
File “”, line 1007, in _find_and_load
File “”, line 986, in _find_and_load_unlocked
File “”, line 680, in load_unlocked
File “PyInstaller\loader\pyimod02_importers.py”, line 385, in exec_module
File "pyhamilton_init
.py", line 10, in
FileNotFoundError: [WinError 3] The system cannot find the path specified: ‘C:\Users\sgellner\AppData\Local\Temp\_MEI224002\pyhamilton\LAY-BACKUP’

I’m not sure what this LAY-BACKUP is supposed to be used by but I was wondering if other people had a similar issue when trying to have people not execute the .py script in the terminal.

Edit:
Here is the include line that is triggering this error


(The pyrepo_ are the custom extensions I made but initialize and HamiltonInterface are stock)

1 Like

What about a batch file to run a Python script? Link

2 Likes

Thank you for the link as well batch file works great for this.

1 Like