pip helper

This commit is contained in:
dengrb1
2023-05-06 22:53:43 +08:00
committed by GitHub
parent 00ceb35fab
commit 7e9c3ebd54
4 changed files with 82 additions and 0 deletions

38
comput_install.pyw Normal file
View File

@@ -0,0 +1,38 @@
from tkinter import *
from tkinter import messagebox
import os
root = Tk()
ml = os.getcwd()
file_error = '文件丢失,请重新安装'
ok = '安装完成'
install = 'pip install'
# def
def tensorFlow():
os.system('pip install TensorFlow')
messagebox.showinfo(install, ok)
def pytorch():
os.system('pip install pytorch')
messagebox.showinfo(install, ok)
def fh():
root.destroy()
# Button
bt_tensorFlow = Button(root, text='TensorFlow安装', command=tensorFlow)
bt_pytorch = Button(root, text='pytorch安装', command=pytorch)
bt_fh = Button(root, text='返回', command=fh)
# pack
Label(root, text='机器学习类库安装').pack()
bt_tensorFlow.pack()
bt_pytorch.pack()
bt_fh.pack()
# mainloop
root.title('install')
root.geometry('150x150+400+700')
root.mainloop()

38
computer_delete.pyw Normal file
View File

@@ -0,0 +1,38 @@
from tkinter import *
from tkinter import messagebox
import os
root = Tk()
ml = os.getcwd()
file_error = '文件丢失,请重新安装'
uninstall = 'pip uninstall'
ok = '删除完成'
# def
def TensorFlow():
os.system('pip uninstall TensorFlow')
messagebox.showinfo(uninstall, ok)
def pytorch():
os.system('pip uninstall pytorch')
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_fh = Button(root, text='返回', command=fh)
# pack
Label(root, text='机器学习类库删除').pack()
bt_TensorFlow.pack()
bt_pytorch.pack()
bt_fh.pack()
# mainloop
root.title('delete')
root.geometry('150x150+400+650')
root.mainloop()

View File

@@ -37,6 +37,8 @@ def GUI_delete():
def web_delete():
open_exe('web_delete')
pass
def computer_delete():
open_exe('computer_delete')
def pyinstaller_remove():
os.system('pip uninstall pyinstaller')
messagebox.showinfo('pip uninstall', ok2)
@@ -64,6 +66,7 @@ def fh():
# Button
remove_GUI = Button(frame, text='GUI类删除', command=GUI_delete).pack()
remove_web = Button(frame, text='web类删除', command=web_delete).pack()
remove_computer = Button(frame, text='机器学习类删除', command=computer_delete).pack()
remove_pyinstaller = Button(frame, text='pyinstaller删除', command=pyinstaller_remove).pack()
remove_tqdm = Button(frame, text='tqdm删除', command=tqdm_remove).pack()
remove_nuitka = Button(frame, text='nuitka删除', command=nuitka_remove).pack()

View File

@@ -39,6 +39,8 @@ def gui_install():
open_exe('GUI_install')
def web_install():
open_exe('web_install')
def computer_install():
open_exe('computer_install')
def pyinstaller():
os.system('pip install pyinstaller')
messagebox.showinfo('pip install', ok)
@@ -65,6 +67,7 @@ def fh():
# Button
pip_gui = Button(frame, text='GUI类安装', command=gui_install).pack()
pip_web = Button(frame, text='web类安装', command=web_install).pack()
pip_computer = Button(frame, text='机器学习类库安装', command=computer_install).pack()
pip_pyinstaller = Button(frame, text='pyinstall安装', command=pyinstaller).pack()
pip_tqdm = Button(frame, text='tqdm安装', command=tqdm).pack()
pip_nuitka = Button(frame, text='nuitka安装', command=nuitka).pack()