File size increased after making very small changes to code and compiling with pyinstaller

回眸只為那壹抹淺笑 提交于 2020-06-01 05:09:11

问题


I had just finished coding coding a small project. This same project which i had coded earlier was 6 Mb in .exe after using pyinstaller but in the latest iteration of code i had made very little changes. Now the the file size of the .exe is 307Mb after i have compiled with pyinstaller. My question is, what could have caused this drastic increase in file size?

I am looking for any possible explanation.

These are the imports i am using:

import pdfkit
import datetime as date
import calendar
import os.path
import getpass
from pandas import to_datetime
from dateutil.relativedelta import *

This is my spec file:

# -*- mode: python ; coding: utf-8 -*-

block_cipher = None


a = Analysis(['test.py'],
             pathex=['C:\\Users\\..\..\..\..Scheduler'], #I have hidden the full path
             binaries=[],
             datas=[],
             hiddenimports=[],
             hookspath=[],
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher,
             noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)
exe = EXE(pyz,
          a.scripts,
          [],
          exclude_binaries=True,
          name='test',
          debug=False,
          bootloader_ignore_signals=False,
          strip=False,
          upx=True,
          console=True )
coll = COLLECT(exe,
               a.binaries,
               a.zipfiles,
               a.datas,
               strip=False,
               upx=True,
               upx_exclude=[],
               name='test')

来源:https://stackoverflow.com/questions/62013903/file-size-increased-after-making-very-small-changes-to-code-and-compiling-with-p

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!