py2exe creating tk and tcl folder how to exclude it

58 Views Asked by At

I Am trying to convert my python project into a exe using py2exe, Iam successful in doing it, however py2exe is creating tk and tcl folders in dict/lib. My project does not import tkinter nor any other module I imported depends on it how to exclude those folders. only modules i imported are pickle, os, and sys

my setup.py file is

from distutils.core import setup
import py2exe, sys, os

sys.argv.append('py2exe')

setup(
    options = {'py2exe': {'bundle_files': 1, 'compressed': True}},
    # excluding
    exclude = ['FixTk', 'tcl', 'tk', '_tkinter', 'tkinter', 'Tkinter'], 
    console = [{'script': "main.py"}],
    zipfile = None
)

i tried to exclude tkinter related modules but that didn't work

0

There are 0 best solutions below