pip helper
This commit is contained in:
parent
97bd44f6bd
commit
5313f6d06e
@ -9,6 +9,22 @@ file_error = '文件丢失,请重新安装'
|
|||||||
ok = '安装完成'
|
ok = '安装完成'
|
||||||
install = 'pip install'
|
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
|
||||||
def tensorFlow():
|
def tensorFlow():
|
||||||
@ -20,19 +36,37 @@ def pytorch():
|
|||||||
def openai():
|
def openai():
|
||||||
os.system('pip install openai')
|
os.system('pip install openai')
|
||||||
messagebox.showinfo(install, ok)
|
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():
|
def fh():
|
||||||
root.destroy()
|
root.destroy()
|
||||||
|
|
||||||
# Button
|
# Button
|
||||||
bt_tensorFlow = Button(root, text='TensorFlow安装', command=tensorFlow)
|
bt_tensorFlow = Button(frame, text='TensorFlow安装', command=tensorFlow)
|
||||||
bt_pytorch = Button(root, text='pytorch安装', command=pytorch)
|
bt_pytorch = Button(frame, text='pytorch安装', command=pytorch)
|
||||||
bt_openai = Button(root, text='openai安装', command=openai)
|
bt_keras = Button(frame, text='keras安装', command=keras)
|
||||||
bt_fh = Button(root, text='返回', command=fh)
|
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
|
# pack
|
||||||
Label(root, text='机器学习类库安装').pack()
|
Label(root, text='机器学习类库安装').pack()
|
||||||
bt_tensorFlow.pack()
|
bt_tensorFlow.pack()
|
||||||
bt_pytorch.pack()
|
bt_pytorch.pack()
|
||||||
|
bt_keras.pack()
|
||||||
|
bt_lightGBM.pack()
|
||||||
|
bt_scikit_learn.pack()
|
||||||
bt_openai.pack()
|
bt_openai.pack()
|
||||||
bt_fh.pack()
|
bt_fh.pack()
|
||||||
|
|
||||||
|
@ -25,8 +25,9 @@ text = '''0.1.0 暂无日志
|
|||||||
1.2.1 加入机器学习库——openai;修复BUG;一键安装所有库正在试验中......
|
1.2.1 加入机器学习库——openai;修复BUG;一键安装所有库正在试验中......
|
||||||
1.3 加入更多GUI库,比如:pyside6, kivy等等;修复一些BUG
|
1.3 加入更多GUI库,比如:pyside6, kivy等等;修复一些BUG
|
||||||
1.4 加入pip安装检测;加入更多web类库;修复一些BUG
|
1.4 加入pip安装检测;加入更多web类库;修复一些BUG
|
||||||
|
1.5 加入更多机器学习库;修复一些BUG
|
||||||
|
|
||||||
当前版本:1.4 (Not beta or demo)'''
|
当前版本:1.5 (Not beta or demo)'''
|
||||||
|
|
||||||
text_box = ScrolledText(root)
|
text_box = ScrolledText(root)
|
||||||
text_box.pack(fill=BOTH, expand=1)
|
text_box.pack(fill=BOTH, expand=1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user