/packaging-pytorch

Packaging PyTorch with PyInstaller, using Hooks

Primary LanguagePython

Packaging PyTorch opencv with PyInstaller

Update: It seems the culprit when bundling with easyocr is not PyTorch, but opencv

Changelog

  • See here
    • pyinstaller downgraded to 4.5.1
    • pyinstaller-hooks-contrib downgraded to 2021.3, from 2022

PyInstaller hooks are required to allow PyTorch to be bundled. The hooks package should automatically be installed when installing PyInstaller.

The documentation provides more details into Hooks, and how to bundle(Page 69, Understanding PyInstaller Hooks).

cx_Freeze may also be required to bundle a Python script with PyTorch.

Bundling the Package

Run the following, before navigating and executing ./dist/main/main.exe

pyinstaller --collect-all easyocr main.py