我的程序(.py)在 vscode 平台上完美运行。然而,用pyinstaller打包成.exe文件后,似乎不起作用。错误消息是“ModuleNotFoundError:没有名为plotly.validators.scatter的模块” 这是我的代码“气泡图”:
# Bubble Diagram Version3.0
import tkinter as tk
import tkinter.filedialog as fd
import plotly as py
import plotly.graph_objs as go
import openpyxl
import pandas as pd
import os
class App(tk.Tk):
def __init__(self):
super().__init__()
self.path1 = fd.StringVar()
self.path2 = fd.StringVar()
self.name_input = fd.StringVar()
group_1 = tk.LabelFrame(self, padx=15, pady=10,
text="Input and Output Settings")
group_1.pack(padx=10, pady=5)
tk.Label(group_1, text='Step1').grid(row=0, column=0)
tk.Button(group_1, text="Import data from", bg='green',
width=20, command=self.choose_file).grid(row=0, column=1)
tk.Label(group_1, textvariable=self.path1, width=40, bg='grey', fg='white').grid(row=0, column=2, pady=5)
tk.Label(group_1, text='Step2').grid(row=1, column=0)
tk.Button(group_1, text="Set output path", bg='orange',
width=20, command=self.choose_directory).grid(row=1, column=1)
tk.Label(group_1, textvariable=self.path2, width=40, bg='grey', fg='white').grid(row=1, column=2, pady=5)
tk.Label(group_1, text='Step3').grid(row=2, column=0)
tk.Label(group_1, text='Input name WITHOUT suffix', bg='SteelBlue', width=20).grid(row=2, column=1)
tk.Entry(group_1, textvariable=self.name_input, bg='grey', width=40).grid(row=2, column=2)
group_2 = tk.LabelFrame(self, padx=15, pady=10, text="Implementation")
group_2.pack(padx=10, pady=5)
tk.Label(group_2, text='Step4').grid(row=0, column=0)
tk.Button(group_2, text="Start to plot", bg='red',
width=10, command=self.start).grid(row=0, column=1)
),
我应该怎么做才能解决问题?谢谢
慕姐8265434
相关分类