I have a script I'm trying to compile with PyInstaller (2.1) using Python 2.7
The script uses a special package that I wrote called auto_common
In a script, I import it with
sys.path.append(path_to_package)
Project folders are as follows:
Automation/ Top level project
Proj1/
script1.py This is the script I want to compile
myspec.spec Spec file for the script
Packages/
auto_common/
__init__.py Init module of the package (empty)
... More modules here
The following warning appears in the PyInstaller log file:
W: no module named auto_common (top-level import by __main__)
How to create a hook that will include a package (for example, using sys.path.append)?
I tried adding the package path to 'pathex' in the spec file, but it did not work.
source
share