🚀 Feature Request
Ensure that this package is compatible with pyinstaller.
🔈 Motivation
I have observed that importing this package into a project that is packaged into an executable with pyinstaller will break the resulting executable. Specifically, you see the following, even if pyserial is installed, and in fact is used elsewhere in the same program without issue:
2022-05-18 11:20:44-0700 [-] Traceback (most recent call last):
2022-05-18 11:20:44-0700 [-] File "calibration\reef.py", line 97, in <module>
2022-05-18 11:20:44-0700 [-] File "c:\users\helen.catanese\pycharmprojects\skalahub\venv\Lib\site-packages\PyInstaller/loader/pyimod03_importers.py", line 391, in load_module
2022-05-18 11:20:44-0700 [-] exec(bytecode, module.__dict__)
2022-05-18 11:20:44-0700 [-] File "calibration\sockeye_comm.py", line 7, in <module>
2022-05-18 11:20:44-0700 [-] File "c:\users\helen.catanese\pycharmprojects\skalahub\venv\Lib\site-packages\PyInstaller/loader/pyimod03_importers.py", line 391, in load_module
2022-05-18 11:20:44-0700 [-] exec(bytecode, module.__dict__)
2022-05-18 11:20:44-0700 [-] File "site-packages\granola\__init__.py", line 2, in <module>
2022-05-18 11:20:44-0700 [-] Modules
2022-05-18 11:20:44-0700 [-] File "c:\users\helen.catanese\pycharmprojects\skalahub\venv\Lib\site-packages\PyInstaller/loader/pyimod03_importers.py", line 391, in load_module
2022-05-18 11:20:44-0700 [-] exec(bytecode, module.__dict__)
2022-05-18 11:20:44-0700 [-] File "site-packages\granola\breakfast_cereal.py", line 38, in <module>
2022-05-18 11:20:44-0700 [-] File "site-packages\granola\breakfast_cereal.py", line 327, in Cereal
2022-05-18 11:20:44-0700 [-] File "site-packages\granola\utils.py", line 121, in check_min_package_version
2022-05-18 11:20:44-0700 [-] File "site-packages\pkg_resources\__init__.py", line 481, in get_distribution
2022-05-18 11:20:44-0700 [-]
2022-05-18 11:20:44-0700 [-] File "site-packages\pkg_resources\__init__.py", line 357, in get_provider
2022-05-18 11:20:44-0700 [-]
2022-05-18 11:20:44-0700 [-] File "site-packages\pkg_resources\__init__.py", line 900, in require
2022-05-18 11:20:44-0700 [-]
2022-05-18 11:20:44-0700 [-] File "site-packages\pkg_resources\__init__.py", line 786, in resolve
2022-05-18 11:20:44-0700 [-]
2022-05-18 11:20:44-0700 [-] pkg_resources.DistributionNotFound: The 'pyserial' distribution was not found and is required by the application
I suspect this issue is related to how/where/when pyinstaller packages up dependencies. But I would like to build a minimum viable example to ensure that it isn't some idiosyncrasy of my project.
🛰 Alternatives
Rather than any code changes, we might also provide documentation on a known workaround.
📎 Additional context
🚀 Feature Request
Ensure that this package is compatible with pyinstaller.
🔈 Motivation
I have observed that importing this package into a project that is packaged into an executable with pyinstaller will break the resulting executable. Specifically, you see the following, even if pyserial is installed, and in fact is used elsewhere in the same program without issue:
I suspect this issue is related to how/where/when pyinstaller packages up dependencies. But I would like to build a minimum viable example to ensure that it isn't some idiosyncrasy of my project.
🛰 Alternatives
Rather than any code changes, we might also provide documentation on a known workaround.
📎 Additional context