pip helper

This commit is contained in:
dengrb1 2023-05-05 13:34:36 +08:00 committed by GitHub
parent db8c97de8c
commit 1c1ff49f81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 3 deletions

View File

@ -17,6 +17,12 @@ def open_exe(exe_name):
messagebox.showerror('install', file_error) messagebox.showerror('install', file_error)
pass pass
pass pass
def GUI_delete():
open_exe('GUI_delete')
pass
def web_delete():
open_exe('web_delete')
pass
def pyinstaller_remove(): def pyinstaller_remove():
os.system('pip uninstall pyinstaller') os.system('pip uninstall pyinstaller')
messagebox.showinfo('pip uninstall', ok2) messagebox.showinfo('pip uninstall', ok2)
@ -38,6 +44,8 @@ def numpy_remove():
messagebox.showinfo(uninstall, ok2) messagebox.showinfo(uninstall, ok2)
pass pass
# 按钮 # 按钮
remove_GUI = Button(root, text='GUI类删除', command=GUI_delete).pack()
remove_web = Button(root, text='web类删除', command=web_delete).pack()
remove_pyinstaller = Button(root, text='pyinstaller删除', command=pyinstaller_remove).pack() remove_pyinstaller = Button(root, text='pyinstaller删除', command=pyinstaller_remove).pack()
remove_tqdm = Button(root, text='tqdm删除', command=tqdm_remove).pack() remove_tqdm = Button(root, text='tqdm删除', command=tqdm_remove).pack()
remove_nuitka = Button(root, text='nuitka删除', command=nuitka_remove).pack() remove_nuitka = Button(root, text='nuitka删除', command=nuitka_remove).pack()

View File

@ -11,13 +11,17 @@ file_error = '文件丢失,请重新安装'
def GUI_install(): def open_exe():
if os.path.exists(os.path.join(ml, "GUI_install.exe")): if os.path.exists(os.path.join(ml, f"{exe_name}.exe")):
os.system("start GUI_install.exe") os.system(f"start {exe_name}.exe")
else: else:
messagebox.showerror('install', file_error) messagebox.showerror('install', file_error)
pass pass
pass pass
def gui_install():
open_exe('GUI_install')
def web_install():
open_exe('web_install')
def pyinstaller(): def pyinstaller():
os.system('pip install pyinstaller') os.system('pip install pyinstaller')
messagebox.showinfo('pip install', ok) messagebox.showinfo('pip install', ok)
@ -39,6 +43,8 @@ def numpy():
messagebox.showinfo(install_1, ok) messagebox.showinfo(install_1, ok)
pass pass
# 按钮 # 按钮
pip_gui = Button(root, text='GUI类安装', command=gui_install).pack()
pip_web = Button(root, text='web类安装', command=web_install).pack()
pip_pyinstaller = Button(root, text='pyinstall安装', command=pyinstaller).pack() pip_pyinstaller = Button(root, text='pyinstall安装', command=pyinstaller).pack()
pip_tqdm = Button(root, text='tqdm安装', command=tqdm).pack() pip_tqdm = Button(root, text='tqdm安装', command=tqdm).pack()
pip_nuitka = Button(root, text='nuitka安装', command=nuitka).pack() pip_nuitka = Button(root, text='nuitka安装', command=nuitka).pack()