install
This commit is contained in:
37
install/GUI_install.pyw
Normal file
37
install/GUI_install.pyw
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
from tkinter import *
|
||||||
|
from tkinter import messagebox
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
root = Tk()
|
||||||
|
ml = os.getcwd()
|
||||||
|
ok = "install OK!"
|
||||||
|
install = "Install"
|
||||||
|
|
||||||
|
def pyqt5():
|
||||||
|
os.system("pip install pyqt5")
|
||||||
|
messagebox.showinfo(install, ok)
|
||||||
|
def wxpython():
|
||||||
|
os.system("pip install wxpython")
|
||||||
|
messagebox.showinfo(install, ok)
|
||||||
|
def pygame():
|
||||||
|
os.system("pip install pygame")
|
||||||
|
messagebox.showinfo(install, ok)
|
||||||
|
|
||||||
|
|
||||||
|
# Button
|
||||||
|
bt_qt = Button(root, text='pyqt5安装', command=pyqt5)
|
||||||
|
bt_pygame = Button(root, text='pygame安装', command=pygame)
|
||||||
|
bt_wx = Button(root, text='wxpython安装', command=wxpython)
|
||||||
|
|
||||||
|
# pack and Label
|
||||||
|
Label(root, text="GUI install").pack()
|
||||||
|
bt_qt.pack()
|
||||||
|
bt_pygame.pack()
|
||||||
|
bt_wx.pack()
|
||||||
|
|
||||||
|
|
||||||
|
# mainloop
|
||||||
|
root.title("GUI")
|
||||||
|
root.geometry('200x200+400+400')
|
||||||
|
root.mainloop()
|
||||||
@@ -6,29 +6,26 @@ import os
|
|||||||
root = Tk()
|
root = Tk()
|
||||||
ok = '安装完成'
|
ok = '安装完成'
|
||||||
install_1 = 'pip install'
|
install_1 = 'pip install'
|
||||||
|
ml = os.getcwd()
|
||||||
|
file_error = '文件丢失,请重新安装'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
def pyinstaller():
|
def pyinstaller():
|
||||||
os.system('pip install pyinstaller')
|
os.system('pip install pyinstaller')
|
||||||
messagebox.showinfo('pip install', ok)
|
messagebox.showinfo('pip install', ok)
|
||||||
pass
|
pass
|
||||||
def pygame():
|
|
||||||
os.system('pip install pygame')
|
|
||||||
messagebox.showinfo('pip install', ok)
|
|
||||||
pass
|
|
||||||
def pyqt():
|
|
||||||
os.system('pip install pyqt5')
|
|
||||||
os.system('pip install PyQtWebEngine')
|
|
||||||
messagebox.showinfo('pip install', ok)
|
|
||||||
pass
|
|
||||||
def Requests():
|
def Requests():
|
||||||
os.system('pip install Requests')
|
os.system('pip install Requests')
|
||||||
messagebox.showinfo('pip install', ok)
|
messagebox.showinfo('pip install', ok)
|
||||||
pass
|
pass
|
||||||
def wxpython():
|
|
||||||
os.system('pip install wxpython')
|
|
||||||
messagebox.showinfo('pip install', ok)
|
|
||||||
pass
|
|
||||||
def nuitka():
|
def nuitka():
|
||||||
os.system('pip install nuitka')
|
os.system('pip install nuitka')
|
||||||
messagebox.showinfo('pip install', ok)
|
messagebox.showinfo('pip install', ok)
|
||||||
@@ -51,10 +48,7 @@ def numpy():
|
|||||||
pass
|
pass
|
||||||
# 按钮
|
# 按钮
|
||||||
pip_pyinstaller = Button(root, text='pyinstall安装', command=pyinstaller).pack()
|
pip_pyinstaller = Button(root, text='pyinstall安装', command=pyinstaller).pack()
|
||||||
pip_pygame = Button(root, text='pygame安装', command=pygame).pack()
|
|
||||||
pip_pyqt = Button(root, text='pyqt5安装', command=pyqt).pack()
|
|
||||||
pip_Requests = Button(root, text='Requests安装', command=Requests).pack()
|
pip_Requests = Button(root, text='Requests安装', command=Requests).pack()
|
||||||
pip_wxpython = Button(root, text='wxpython安装', command=wxpython).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()
|
||||||
pip_pywin32 = Button(root, text='pywin32安装', command=pywin32).pack()
|
pip_pywin32 = Button(root, text='pywin32安装', command=pywin32).pack()
|
||||||
Reference in New Issue
Block a user