To answer the more general question of why PyInstaller can't find a certain module at runtime - it only packages the modules it thinks your program needs, and sometimes it doesn't detect a module correctly, leading to it not being included.
Jasper Harrison, aka Legorooj Core Developer on PyInstaller https://legorooj.net \-------- Original Message -------- On 5 Jan 2024, 01:30, Tony C < cappy2...@gmail.com> wrote: > > > > > Hello, > > > > > I've been reading through the Pyinstaller docs trying to understand why the > Python interpreter can find modules at application runtime (as sources, NOT > an exe), but Pyinstaller > > cannot. Pyinstaller itself is also a python application. > > > > > Oddly enough, I ran into an issue today where Pyinstaller couldn't find an > import that comes with the Python interpreter (Python 3.11). This makes no > sense to me. > > > > > When I fire up the python interpreter and manually import that module (imp.py) > > the import works, although a deprecation warning is displayed. > > > > > **import imp** > > "<stdin>:1: DeprecationWarning: the imp module is deprecated in favour of > importlib and slated for removal in Python 3.12; see the module's > documentation for alternative uses" > > \-- > 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][pyinstaller_unsubscribe_googlegroups.com]. > To view this discussion on the web visit > [https://groups.google.com/d/msgid/pyinstaller/5aebaf08-6c8b-4f4d-b542-52846d89cd9en%40googlegroups.com][https_groups.google.com_d_msgid_pyinstaller_5aebaf08-6c8b-4f4d-b542-52846d89cd9en_40googlegroups.com]. > [pyinstaller_unsubscribe_googlegroups.com]: mailto:pyinstaller+unsubscr...@googlegroups.com [https_groups.google.com_d_msgid_pyinstaller_5aebaf08-6c8b-4f4d-b542-52846d89cd9en_40googlegroups.com]: https://groups.google.com/d/msgid/pyinstaller/5aebaf08-6c8b-4f4d-b542-52846d89cd9en%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 pyinstaller+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/AnINVrkZ7hC8yEwHFtvhfDWGJud9NOSK4ODD25eicjA-UQM37iDYoPw1q1REwUrw9-X6Inj5wrlj2bcgUs_E5KOfZyHSp6uHZWk3gqb_68w%3D%40protonmail.com.
publickey - EmailAddress(s=legorooj@protonmail.com) - 0x164CF234.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature