使用pyinstaller或auto-py-to-exe创建.exe文件时出现问题

时间:2020-09-12 19:34:35

标签: python tkinter exe pyinstaller nba-api

我正在尝试制作一个python脚本的.exe文件,以提供一个简单的界面(使用Tkinter)来多年来多年来一直从NBA球员(使用matplotlib)生成击球图,

Graphic interface

但是当我尝试使用pyinstaller创建.exe时,它没有用。

现在,我已经尝试了发现的所有可能的解决方案,从auto-py-to-exe(对此尝试了几次),--onefile,-onedir,甚至尝试删除图像( NBA标志)和图标,但所有结果都相同。

在大多数尝试中,当我尝试执行.exe文件时,会花一些时间,然后显示“无法执行脚本”消息。

我不是编程专家,也不是编程专家,我在学习过程中会有所学习,因此,如果有人对我可以(在哪里)解决该问题有任何想法(如果有办法)解决它),我将非常感谢。

在这里,我将保留该程序具有的所有模块,以防相关:

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

我不确定其余代码是否相关,因为我认为这与问题无关,但是如有必要,我可以将其放在此处。

我最好的猜测是该程序具有pyinstaller无法正确识别的模块,或者我没有足够的知识来理解该模块(可能是第二个模块)。

Error code

Error code 2

0 个答案:

没有答案