My favourite technique to identify which dependencies I need is to create a clean venv and then try testing my code with it active. If I get an import error I can either look at why I need that import or, if it really is needed, simply pip install within the venv.
Of course running pylint and addressing any unneeded/unused imports helps a lot as well. Steve Barnes From: 'Chris Barker' via PyInstaller <[email protected]> Sent: 27 March 2020 15:53 To: [email protected] Subject: Re: [PyInstaller] Re: Is there any way to specify which modules to import? On Fri, Mar 27, 2020 at 2:13 AM abhishek bhatta <[email protected]<mailto:[email protected]>> wrote: I looked into that but there are too many packages that needs to be in the exclude list. you might take a step back and try to figure out *why* PyInstller thinks you need all those packages. Perhaps you can do your imports differently, and get a more compact install. -CHB That is going to be an overhead, is there some way to just point which packages to import. On Friday, March 27, 2020 at 12:50:07 AM UTC+5:30, Amir Rossert wrote: Hi, try to look at —hidden-import and —exclude-module flags https://pythonhosted.org/PyInstaller/usage.html#what-to-bundle-where-to-search -- 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]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/7052d4a3-3cf6-4c12-99bc-ad0cf1b97b34%40googlegroups.com<https://groups.google.com/d/msgid/pyinstaller/7052d4a3-3cf6-4c12-99bc-ad0cf1b97b34%40googlegroups.com?utm_medium=email&utm_source=footer>. -- 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 [email protected]<mailto:[email protected]> -- 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]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/CALGmxE%2BKtD5z29pxk2ncf2OLW4g9XAt19iCuM5UF9whmfnpOVQ%40mail.gmail.com<https://groups.google.com/d/msgid/pyinstaller/CALGmxE%2BKtD5z29pxk2ncf2OLW4g9XAt19iCuM5UF9whmfnpOVQ%40mail.gmail.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/VI1PR03MB4479193EA19634E269B638879BCC0%40VI1PR03MB4479.eurprd03.prod.outlook.com.
