pip-helper/install.py

53 lines
1.4 KiB
Python
Raw Permalink Normal View History

2023-04-07 23:17:25 +08:00
from tkinter import *
from tkinter import messagebox
import os
root = Tk()
ok = '安装完成'
install_1 = 'pip install'
2023-05-01 15:41:19 +00:00
ml = os.getcwd()
file_error = '文件丢失,请重新安装'
2023-04-07 23:17:25 +08:00
2023-05-01 15:41:19 +00:00
def GUI_install():
if os.path.exists(os.path.join(ml, "GUI_install.exe")):
os.system("start GUI_install.exe")
else:
messagebox.showerror('install', file_error)
pass
pass
2023-04-07 23:17:25 +08:00
def pyinstaller():
os.system('pip install pyinstaller')
messagebox.showinfo('pip install', ok)
pass
def nuitka():
os.system('pip install nuitka')
messagebox.showinfo('pip install', ok)
pass
def pywin32():
os.system('pip install pywin32')
messagebox.showinfo(install_1, ok)
pass
def tqdm():
os.system('pip install tqdm')
messagebox.showinfo(install_1, ok)
pass
def numpy():
os.system('pip install numpy')
messagebox.showinfo(install_1, ok)
pass
# 按钮
pip_pyinstaller = Button(root, text='pyinstall安装', command=pyinstaller).pack()
pip_tqdm = Button(root, text='tqdm安装', command=tqdm).pack()
pip_nuitka = Button(root, text='nuitka安装', command=nuitka).pack()
pip_pywin32 = Button(root, text='pywin32安装', command=pywin32).pack()
pip_numpy = Button(root, text='numpy安装', command=numpy)
# 初始化程序
root.title('安装模式')
root.geometry('200x250+10+0')
root.mainloop()