Thank you bwoodsend and Christoper for your responses. I'll look into 
making a package that's pip-installable. More fun stuff to learn!

Paul 

On Saturday, May 14, 2022 at 2:06:40 AM UTC-5 [email protected] wrote:

> Where/how do you install your utils module?
>
> I highly recommend that you make a package out of it and install it.
>
> That’s a good idea for all sorts of reasons, and will likely make 
> PyInstaller happier.
>
> -CHB
>
> Christopher Barker, Ph.D.
> Oceanographer
>
> Emergency Response Division
> NOAA/NOS/OR&R            (206) 526-6959   voice
> 7600 Sand Point Way NE   (206) 526-6329   fax
> Seattle, WA  98115       (206) 526-6317   main reception
>
> On May 13, 2022, at 8:46 AM, Paul Fishback <[email protected]> wrote:
>
> I have a script that utilizes a custom module named "utils." At the 
> start of the main script, I import functions from scripts contained within 
> "utils," such as "from utils.general import helper."
>
>
> I've been trying to add my own module as a hidden import in my spec file, 
> and while running pyinstaller doesn't produce any errors, double clicking 
> on the executable leads to ModuleNotFoundError: No module named 'utils'
>
> Here's my spec file, where I've tried adding the module as a hidden import 
> as well as in pathex:
>
> block_cipher = None
> a = Analysis(['My Application.py'],
>              pathex=['C:\\Users\\utils'],
>              binaries=[],
>              datas=datas,
>              hiddenimports=['C:\\Users\\utils','PIL'],
>              hookspath=[],
>              hooksconfig={},
>              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='My Application',
>           debug=False,
>           bootloader_ignore_signals=False,
>           strip=False,
>           upx=True,
>           upx_exclude=[],
>           runtime_tmpdir=None,
>           console=False,
>           disable_windowed_traceback=False,
>           target_arch=None,
>           codesign_identity=None,
>       icon='my_icon.ico',
>       version='file_version_info.txt',
>           entitlements_file=None )
>
> app = BUNDLE(name='My Application.exe',bundle_identifier=None,
> info_plist={
>         'CFBundleIdentifier': 'My Application',
>         'CFBundleName': 'My Application',
>         'CFBundleIconFile': 'my_icon.ico',
>         'CFBundleDisplayName': 'My Application',
>         'CFBundleShortVersionString':'v 0.1',
>         'LSEnvironment': {
>             'LANG': 'de_DE.UTF-8',
>             'LC_CTYPE': 'de_DE.UTF-8'
>         }})
>
> -- 
> 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/e28ebb38-5c58-407e-b955-2f2f74536b13n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/pyinstaller/e28ebb38-5c58-407e-b955-2f2f74536b13n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>

-- 
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/9b7df99c-6898-4bcc-8c6b-2512019ab391n%40googlegroups.com.

Reply via email to