I am not finding a specific topic on this issue with the setup file for cx_Freeze.
I am trying to create an exe for my program but something is not wright with the distutils
. I am not able to locate an update whl
for this library so I am not sure if there is a known fix for this.
The program works fine without error.
Does anyone know why this issue exist.
Please note I am not able to use pip
from inside my work network so I have to do everything with whl
, tar.gz' and egg
files to install libraries.
This is why I am trying to find an updated whl
file for distutils
.
My setup.py file.
from cx_Freeze import setup, Executable
base = None
build_exe_options = {'packages': ['idna',
'json',
'tkinter',
'operator',
'clipboard',
'matplotlib',
'tkinter.ttk ',
'matplotlib.pyplot',
'matplotlib.backends.backend_tkagg'],
'include_files': ['tracker1.json', 'tracker2.json']}
setup(
name='<NAME>',
options={'build.exe': build_exe_options},
version='<0.2>',
description='<some random desc>',
executables=[Executable('MAIN.py', base=base)]
)
The error:
"C:\Users\user_name\Desktop\Python 3.6.2\python.exe" "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 2016.2.3\helpers\pycharm\pycharm_setup_runner.py" "C:\Users\user_name\Desktop\Python Work Projects\GATE\setup.py"
Testing started at 2:55 PM ...
Traceback (most recent call last):
running pycharm_test
File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 2016.2.3\helpers\pycharm\pycharm_setup_runner.py", line 26, in <module>
exec (fh.read(), globals(), locals())
File "<string>", line 21, in <module>
File "C:\Users\user_name\Desktop\Python 3.6.2\lib\site-packages\cx_Freeze\dist.py", line 349, in setup
distutils.core.setup(**attrs)
File "C:\Users\user_name\Desktop\Python 3.6.2\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\user_name\Desktop\Python 3.6.2\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Users\user_name\Desktop\Python 3.6.2\lib\distutils\dist.py", line 972, in run_command
cmd_obj = self.get_command_obj(command)
File "C:\Users\user_name\Desktop\Python 3.6.2\lib\distutils\dist.py", line 847, in get_command_obj
cmd_obj = self.command_obj[command] = klass(self)
File "C:\Users\user_name\Desktop\Python 3.6.2\lib\site-packages\setuptools\__init__.py", line 147, in __init__
_Command.__init__(self, dist)
File "C:\Users\user_name\Desktop\Python 3.6.2\lib\distutils\cmd.py", line 57, in __init__
raise TypeError("dist must be a Distribution instance")
TypeError: dist must be a Distribution instance