Yes, but it requires #5697 <https://github.com/pyinstaller/pyinstaller/pull/5697> which was released this morning in PyInstaller 4.3. Now if you also add your source files as data files then FrozenImporter.get_source() (and therefore Python’s tracebacks mechanisms) can find them.
For top level code or imports in the same folder as your top level code, it should just be a case of adding --add-data=path/to/file.py:. (Unix) or --add-data=path/to/file.py;. (Windows). (In both cases note the trailing dot.) To include fully fledged packages containing an __init__.py you’ll likely have abandon the command line and to switch over to the spec file. Edit the .spec file generated by PyInstaller putting from PyInstaller.utils.hooks import collect_data_files at the top then set datas=[] to datas=collect_data_files('foo') (replacing foo with the real name of the library). Then rebuild using pyinstaller specfile-name.spec. -- 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 pyinstaller+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/3558496f-a235-46a9-8181-9ff7bfdac7e8n%40googlegroups.com.