pip helper

This commit is contained in:
dengrb1 2023-05-07 09:59:57 +08:00 committed by GitHub
parent 87d42f2e5b
commit 4899051615
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 3 deletions

View File

@ -7,6 +7,7 @@ root = Tk()
ml = os.getcwd()
file_error = '文件丢失!请重新安装'
ok2 = "删除完成"
uninstall = 'pip uninstall'
def pyqt_remove():
@ -22,12 +23,20 @@ def pygame_remove():
os.system('pip uninstall pygame')
messagebox.showinfo('pip uninstall', ok2)
pass
def Matplotlib():
os.system('pip uninstall Matplotlib')
messagebox.showinfo(uninstall, ok2)
def Seaborn():
os.system('pip uninstall Seaborn')
messagebox.showinfo(uninstall, ok2)
def fh():
root.destroy()
# button
bt_pq5 = Button(root, text='pyqt5删除', command=pyqt_remove)
bt_pygame = Button(root, text='pygame删除', command=pygame_remove)
bt_matplotlib = Button(root, text='matplotlib删除', command=Matplotlib)
bt_seaborn = Button(root, text='Seaborn删除', command=Seaborn)
bt_wxpython = Button(root, text='wxpython删除', command=wxpython_remove)
bt_fh = Button(root, text='返回', command=fh)
@ -35,11 +44,13 @@ bt_fh = Button(root, text='返回', command=fh)
Label(root, text='GUI删除').pack()
bt_pq5.pack()
bt_pygame.pack()
bt_matplotlib.pack()
bt_seaborn.pack()
bt_wxpython.pack()
bt_fh.pack()
# mainloop
root.title('GUI')
root.geometry('200x200+400+500')
root.geometry('200x230+400+500')
root.mainloop()

View File

@ -18,6 +18,12 @@ def wxpython():
def pygame():
os.system("pip install pygame")
messagebox.showinfo(install, ok)
def Matplotlib():
os.system('pip install Matplotlib')
messagebox.showinfo(install, ok)
def Seaborn():
os.system('pip install Seaborn')
messagebox.showinfo(install, ok)
def fh():
root.destroy()
@ -25,18 +31,22 @@ def fh():
# Button
bt_qt = Button(root, text='pyqt5安装', command=pyqt5)
bt_pygame = Button(root, text='pygame安装', command=pygame)
bt_matplotlib = Button(root, text='matplotlib安装', command=Matplotlib)
bt_seaborn = Button(root, text='Seaborn安装', command=Seaborn)
bt_wx = Button(root, text='wxpython安装', command=wxpython)
bt_fh = Button(root, text='返回', command=fh)
# pack and Label
Label(root, text="GUI install").pack()
Label(root, text="GUI").pack()
bt_qt.pack()
bt_pygame.pack()
bt_matplotlib.pack()
bt_seaborn.pack()
bt_wx.pack()
bt_fh.pack()
# mainloop
root.title("GUI")
root.geometry('200x200+400+400')
root.geometry('200x230+400+400')
root.mainloop()