Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0df6de9314 | ||
|
|
b1822867ed | ||
|
|
0e4aeb62d2 | ||
|
|
5313f6d06e | ||
|
|
97bd44f6bd |
@@ -10,6 +10,24 @@ uninstall = 'pip uninstall'
|
||||
ok = '删除完成'
|
||||
|
||||
|
||||
# 创建滚动区域的Canvas对象
|
||||
canvas = Canvas(root, width=280, height=280, scrollregion=(0, 0, 500, 500))
|
||||
|
||||
# 创建可滚动区域的Frame对象,并将其添加到Canvas中
|
||||
frame = Frame(canvas)
|
||||
frame.bind("<Configure>", lambda e: canvas.configure(scrollregion=canvas.bbox("all")))
|
||||
canvas.create_window((0, 0), window=frame, anchor="nw")
|
||||
|
||||
# 创建Scrollbar对象,并将其绑定到Canvas上
|
||||
scrollbar = Scrollbar(root, orient="vertical", command=canvas.yview)
|
||||
canvas.configure(yscrollcommand=scrollbar.set)
|
||||
scrollbar.pack(side="right", fill="y")
|
||||
|
||||
# 显示Canvas和Scrollbar
|
||||
canvas.pack(side="left", fill="both", expand=True)
|
||||
|
||||
|
||||
|
||||
# def
|
||||
def TensorFlow():
|
||||
os.system('pip uninstall TensorFlow')
|
||||
@@ -20,19 +38,42 @@ def pytorch():
|
||||
def openai():
|
||||
os.system('pip uninstall openai')
|
||||
messagebox.showinfo(uninstall, ok)
|
||||
def keras():
|
||||
os.system('pip uninstall keras')
|
||||
messagebox.showinfo(uninstall, ok)
|
||||
def scikit_learn():
|
||||
os.system('pip uninstall scikit-learn')
|
||||
messagebox.showinfo(uninstall, ok)
|
||||
def lightGBM():
|
||||
os.system('pip uninstall lightGBM')
|
||||
messagebox.showinfo(uninstall, ok)
|
||||
def CatBoost():
|
||||
os.system('pip uninstall CatBoost')
|
||||
messagebox.showinfo(uninstall, ok)
|
||||
def XGBoost():
|
||||
os.system('pip uninstall XGBoost')
|
||||
messagebox.showinfo(uninstall, ok)
|
||||
def fh():
|
||||
root.destroy()
|
||||
|
||||
# Button
|
||||
bt_TensorFlow = Button(root, text='TensorFlow删除', command=TensorFlow)
|
||||
bt_pytorch = Button(root, text='pytorch删除', command=pytorch)
|
||||
bt_openai = Button(root, text='openai删除', command=openai)
|
||||
bt_fh = Button(root, text='返回', command=fh)
|
||||
bt_TensorFlow = Button(frame, text='TensorFlow删除', command=TensorFlow)
|
||||
bt_pytorch = Button(frame, text='pytorch删除', command=pytorch)
|
||||
bt_keras = Button(frame, text='keras安装', command=keras)
|
||||
bt_lightGBM = Button(frame, text='lightGBM安装', command=lightGBM)
|
||||
bt_scikit_learn = Button(frame, text='scikit-learn安装', command=scikit_learn)
|
||||
bt_XGBoost = Button(frame, text='XGBoost删除', command=XGBoost)
|
||||
bt_openai = Button(frame, text='openai删除', command=openai)
|
||||
bt_fh = Button(frame, text='返回', command=fh)
|
||||
|
||||
# pack
|
||||
Label(root, text='机器学习类库删除').pack()
|
||||
bt_TensorFlow.pack()
|
||||
bt_pytorch.pack()
|
||||
bt_keras.pack()
|
||||
bt_lightGBM.pack()
|
||||
bt_XGBoost.pack()
|
||||
bt_scikit_learn.pack()
|
||||
bt_openai.pack()
|
||||
bt_fh.pack()
|
||||
|
||||
|
||||
@@ -9,6 +9,22 @@ file_error = '文件丢失,请重新安装'
|
||||
ok = '安装完成'
|
||||
install = 'pip install'
|
||||
|
||||
# 创建滚动区域的Canvas对象
|
||||
canvas = Canvas(root, width=280, height=280, scrollregion=(0, 0, 500, 500))
|
||||
|
||||
# 创建可滚动区域的Frame对象,并将其添加到Canvas中
|
||||
frame = Frame(canvas)
|
||||
frame.bind("<Configure>", lambda e: canvas.configure(scrollregion=canvas.bbox("all")))
|
||||
canvas.create_window((0, 0), window=frame, anchor="nw")
|
||||
|
||||
# 创建Scrollbar对象,并将其绑定到Canvas上
|
||||
scrollbar = Scrollbar(root, orient="vertical", command=canvas.yview)
|
||||
canvas.configure(yscrollcommand=scrollbar.set)
|
||||
scrollbar.pack(side="right", fill="y")
|
||||
|
||||
# 显示Canvas和Scrollbar
|
||||
canvas.pack(side="left", fill="both", expand=True)
|
||||
|
||||
|
||||
# def
|
||||
def tensorFlow():
|
||||
@@ -20,19 +36,37 @@ def pytorch():
|
||||
def openai():
|
||||
os.system('pip install openai')
|
||||
messagebox.showinfo(install, ok)
|
||||
def keras():
|
||||
os.system('pip install keras')
|
||||
messagebox.showinfo(install, ok)
|
||||
def scikit_learn():
|
||||
os.system('pip install scikit-learn')
|
||||
messagebox.showinfo(install, ok)
|
||||
def lightGBM():
|
||||
os.system('pip install lightGBM')
|
||||
messagebox.showinfo(install, ok)
|
||||
def CatBoost():
|
||||
os.system('pip install CatBoost')
|
||||
messagebox.shir
|
||||
def fh():
|
||||
root.destroy()
|
||||
|
||||
# Button
|
||||
bt_tensorFlow = Button(root, text='TensorFlow安装', command=tensorFlow)
|
||||
bt_pytorch = Button(root, text='pytorch安装', command=pytorch)
|
||||
bt_openai = Button(root, text='openai安装', command=openai)
|
||||
bt_fh = Button(root, text='返回', command=fh)
|
||||
bt_tensorFlow = Button(frame, text='TensorFlow安装', command=tensorFlow)
|
||||
bt_pytorch = Button(frame, text='pytorch安装', command=pytorch)
|
||||
bt_keras = Button(frame, text='keras安装', command=keras)
|
||||
bt_lightGBM = Button(frame, text='lightGBM安装', command=lightGBM)
|
||||
bt_scikit_learn = Button(frame, text='scikit-learn安装', command=scikit_learn)
|
||||
bt_openai = Button(frame, text='openai安装', command=openai)
|
||||
bt_fh = Button(frame, text='返回', command=fh)
|
||||
|
||||
# pack
|
||||
Label(root, text='机器学习类库安装').pack()
|
||||
bt_tensorFlow.pack()
|
||||
bt_pytorch.pack()
|
||||
bt_keras.pack()
|
||||
bt_lightGBM.pack()
|
||||
bt_scikit_learn.pack()
|
||||
bt_openai.pack()
|
||||
bt_fh.pack()
|
||||
|
||||
|
||||
@@ -20,8 +20,6 @@ def open_exe(exe_name):
|
||||
# try
|
||||
try:
|
||||
import pip
|
||||
print('pip已经安装!!')
|
||||
sleep(0.5)
|
||||
open_exe('client')
|
||||
except ImportError:
|
||||
print("请安装Pip或者python")
|
||||
|
||||
@@ -25,8 +25,9 @@ text = '''0.1.0 暂无日志
|
||||
1.2.1 加入机器学习库——openai;修复BUG;一键安装所有库正在试验中......
|
||||
1.3 加入更多GUI库,比如:pyside6, kivy等等;修复一些BUG
|
||||
1.4 加入pip安装检测;加入更多web类库;修复一些BUG
|
||||
1.5 加入更多机器学习库;修复一些BUG;修改pip安装检测代
|
||||
|
||||
当前版本:1.4 (Not beta or demo)'''
|
||||
当前版本:1.5 (Not beta or demo)'''
|
||||
|
||||
text_box = ScrolledText(root)
|
||||
text_box.pack(fill=BOTH, expand=1)
|
||||
|
||||
Reference in New Issue
Block a user