Search code examples
pythonpython-3.xtkinterpyinstallercx-freeze

Exporting Python 3.5 and Tkinter to EXE or MSI


I'm using Python 3.5 and would like to export my python code for me to send to others who do not have Python installed. Thing is Pyinstaller doesn't work as I get this error:Pyinstaller Error

CX_Freeze also doesn't work for me either as Tkinter still presents a problem, on running python setup.py build I get:

KeyError: 'TCL_LIBRARY'

I'm getting sick of this to be frank so any help would be appreciated. Here's my imports in my code if it helps

import pdb
from tkinter import *
from tkinter import filedialog
import tkinter.messagebox
from datetime import datetime, date, timedelta

import pandas as pd
import numpy as np
from xlsxwriter.utility import xl_rowcol_to_cell

Solution

  • Well I managed to get it working by downloading Pyinstaller from the website and running the commands in the new folder. I followed the steps in this answer here.