I am trying to make an .exe file of my python script that provides an easy interface (using Tkinter) to generate Shot Charts from NBA players (using matplotlib) all over the years, this one just below:
But when I tried to create the .exe using pyinstaller, it didn't worked.
Now, I've tried every possible solution I found, going from auto-py-to-exe (several tries with this one), --onefile, --onedir, to me even trying to remove the image (the NBA logo) and icon, among other things, but all of them with the same result.
In most of the tries, when I try to execute the .exe file, it takes a moment and then shows the "Failed to execute script" message.
I'm not exactly an expert or anything on programming, I'm kind of learning as I do stuff, so if someone has any ideas about what (and where) can I do to solve this (if is there a way to solve it) I would appreciate it very much.
Here I am just going to leave all the modules that the program has, just in case that it is relevant:
import numpy as np
import pandas as pd
from nba_api.stats.static import players
from nba_api.stats.endpoints import shotchartdetail
from nba_api.stats.endpoints import playercareerstats
import matplotlib.pyplot as plt
import seaborn as sns
from matplotlib import cm
from matplotlib.patches import Circle, Rectangle, Arc, ConnectionPatch
from matplotlib.patches import Polygon
from matplotlib.collections import PatchCollection
from matplotlib.colors import LinearSegmentedColormap, ListedColormap, BoundaryNorm
from matplotlib.path import Path
from matplotlib.patches import PathPatch
from tkinter import *
from ttkthemes import themed_tk as tk
from tkinter import font
from PIL import ImageTk,Image
I'm not sure if the rest of the code is relevant, since I don't think it has anything to do with the problem, but I can put it here if necessary.
My best guess would be that the program has a module that pyinstaller doesn't recognize properly, or that it is something that I don't have enough knowledge to understand (probably the 2nd).