python - Pyinstaller:在以下目录中找不到可用的 init.tcl 这可能意味着 tcl 没有正确安装
问题描述
我正在做我的 tkinter 项目。当我尝试使用 pyinstaller 编译它时,我得到了图片中显示的错误。在重置我的电脑之前没有发生这种情况:
我试图编译的代码:
import tkinter as tk
from tkinter import filedialog, Text, DISABLED, NORMAL, ttk
from PIL import ImageTk, Image
import pyglet,tkinter
pyglet.font.add_file('font.ttf')
arkaplan = "#000000"
koyugri = "#1c1c1c"
root = tk.Tk()
root.title(f"AcemTube Başlatılıyor...")
root.resizable(False, False)
yer = str(root.winfo_screenwidth()/2 - 350/2).split(".")[0]
yer1 = str(root.winfo_screenheight()/2 - 90/2).split(".")[0]
root.geometry(f"350x90+{yer}+{yer1}")
root.overrideredirect(1)
canvas = tk.Canvas(root, height=90, width=350, background="#23272a")
canvas.pack()
#baslikutu = tk.Frame(root, bg="#2082b2")
#baslikutu.place(relwidth=1, relheight=0.1)
baslikutu1 = tk.Frame(root, bg=arkaplan)
baslikutu1.place(relwidth=1, relheight=1)
baslik = tk.Label(baslikutu1, text=f"AcemTube", bg=arkaplan, fg="white")
baslik.config(font=("Montserrat ExtraBold", "28", "bold italic"))
baslik.place(relwidth=0.65, relheight=0.75, relx=0.299)
frm= tk.Frame()
logo = ImageTk.PhotoImage(Image.open("acemtubes.png"))
rlbl = tk.Label(baslikutu1, image=logo, bg=arkaplan ,fg="#23272a")
rlbl.place(relwidth=0.31, relheight=0.78)
s = ttk.Style()
s.theme_use("clam")
s.configure("red.Horizontal.TProgressbar", foreground='#23272a', background='#2082b2', troughcolor=koyugri, bordercolor="#2082b2", darkcolor="#2082b2", lightcolor="#2082b2")
prgs = ttk.Progressbar(baslikutu1, style="red.Horizontal.TProgressbar", orient=tk.HORIZONTAL, length=350, mode="determinate")
prgs.place(rely=0.791)
prgs.start(24)
root.mainloop()`
谢谢阅读。我是菜鸟,所以请解释一下如何解决这个问题。谢谢 :)
编辑:我忘了说 init.tcl 存在于这个文件夹中。Tcl 文件夹的图像
解决方案
推荐阅读
- python-3.x - Python - 如何将多行写入文件?(列表,不是字符串)
- javascript - 为什么当它的处理程序返回一个数组时 jest mockImplementation 不起作用?
- c - 没有“=”的 K&R C 初始化在 gcc 中查找支持的选项
- android-studio - 导入项目时无法解析符号以及库树上缺少 Androidmanifest.xml 文件
- kendo-ui - 避免在 Kendo 对话框动作中创建闭包
- opencv - 将包含 jpeg 图像的文件夹转换为 hdf5
- text - MLCK在文本分析中是什么意思
- c - 当分配给“float”时,附加“f”何时会更改浮动常量的值?
- firebase - 突然 Firebase 事件未导出到 Bigquery
- python - 扩张图像以消除间隙并获得原始轮廓大小的扩张轮廓