I have a small script in python2.7 that I want to convert into Windows executable. I use
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
coor = raw_input(">>>top x left: ").replace(" ", "")
top, left = coor.split("x")
top = int(top.strip())
left = int(left.strip())
return top, left
def plot_location(top, left):
top, left = get_inputs()
if __name__ == '__main__':
print "Input top x left coordinates (no space) eg: 44x232"
run = True
I have a feeling that
matplotlib uses the
Tkinter module internally, but imports it in a non-standard way. Then
pyinstaller doesn't notice Tkinter is needed, and subsequently doesn't bundle it into the executable.
Try explicitly putting
import Tkinter at the top of your script.