You don't specify if you are using onefile (which compresses it) or not so 
I don't know if this is 1.5GB raw or after compression. Recent tensorflow 
versions genuinely are about 1.5GB in size uncompressed so if you're using 
onedir then that is it I'm afraid. The only way around that is to downgrade 
to an older tensorflow when they were only ~200MB. If you're already using 
onefile (which, despite reducing the size, is usually is a bad idea for 
huge binaries because it takes ages to unpack) then it is probably as Steve 
says - other rubbish is getting dragged in.

On Tuesday, May 4, 2021 at 8:31:02 AM UTC+1 gadge...@live.co.uk wrote:

> I suspect that you are using an Anaconda installation which includes just 
> about everything (alternatively you are not working in a minimal venv) - 
> try:
>
>    1. Install Python from https://python.org 
>    2. Create and activate a virtual machine using python -mvenv
>    3. pip install pysintaller and just the libraries that you actually use
>    4. test to make sure everything is working
>    5. run pyinstaller
>
>  
>
> You should end up with a much smaller package.
>
>  
>
> Steve Barnes
>
>  
>
> *From:* pyins...@googlegroups.com <pyins...@googlegroups.com> *On Behalf 
> Of *Yogesh Sheoran
> *Sent:* 04 May 2021 06:22
> *To:* PyInstaller <pyins...@googlegroups.com>
> *Subject:* [PyInstaller] External Imports
>
>  
>
> Hi, I am relatively new with pyinstaller and could not find any 
> reference/help with my requirement.
>
> I am creating an application which is using all the major ML frameworks 
> like tensorflow, pytorch, onnx, caffe, mxnet. While packaging it with 
> pyInstaller, I am able to pack it successfully but exe size is around 1.5GB.
>
> I was wondering is there any way to tell/point the python interpretor 
> packed with pyinstaller to look for these imports on the host machine?
>
> There is one option in pyinstaller "exclude" but this excluded module can 
> not import something which is not already imported by other packed modules.
>
>  
>
> -- 
> 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...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pyinstaller/c5b4c9b0-ff9f-47f5-9cc0-837808822abfn%40googlegroups.com
>  
> <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fpyinstaller%2Fc5b4c9b0-ff9f-47f5-9cc0-837808822abfn%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=04%7C01%7C%7C0aa999deb1004938230608d90ecda026%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637557098573981510%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=2zti18RMmHohpRT8giE9xSH4qpeV8TZTIXU6vdSuJeE%3D&reserved=0>
> .
>

-- 
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/608e78af-47e2-40f4-b64c-8c054bec7e37n%40googlegroups.com.

Reply via email to