PyInstaller with Pandas creates over 500 MB exe

后端 未结 6 1212
栀梦
栀梦 2020-12-08 05:39

I try to create an exe file using PyInstaller 3.2.1, for test purpose I tried to make an exe for following code:

import pandas as pd
print(\'hello world\')
<         


        
6条回答
  •  误落风尘
    2020-12-08 06:20

    You need pure python environment, No Anaconda.

    Because, it has too many useless packages. Install new python environment on another PC with as few package as possible!

    Then try to use pyinstaller again. With this method, pyinstaller reduced the file from 200M to 8M.

    PS: If you lack of some packages, you can pip install ...

提交回复
热议问题