From 178591eaa9ca8968eeebf2bad4e929138474307d Mon Sep 17 00:00:00 2001 From: dengrb1 <125752069+dengrb1@users.noreply.github.com> Date: Fri, 12 May 2023 13:28:36 +0800 Subject: [PATCH] pip helper --- install.pyw | 6 ------ maths_install.pyw | 35 +++++++++++++++++++++++++++++++++++ not_have | 1 + web_delete.pyw | 2 +- 4 files changed, 37 insertions(+), 7 deletions(-) create mode 100644 maths_install.pyw create mode 100644 not_have diff --git a/install.pyw b/install.pyw index 431fead..9a9689c 100644 --- a/install.pyw +++ b/install.pyw @@ -57,10 +57,6 @@ def tqdm(): os.system('pip install tqdm -i https://mirrors.aliyun.com/pypi/simple/') messagebox.showinfo(install, ok) pass -def numpy(): - os.system('pip install numpy -i https://mirrors.aliyun.com/pypi/simple/') - messagebox.showinfo(install, ok) - pass def fh(): root.destroy() @@ -72,7 +68,6 @@ pip_pyinstaller = Button(frame, text='pyinstaller安装', command=pyinstaller) pip_tqdm = Button(frame, text='tqdm安装', command=tqdm) pip_nuitka = Button(frame, text='nuitka安装', command=nuitka) pip_pywin32 = Button(frame, text='pywin32安装', command=pywin32) -pip_numpy = Button(frame, text='numpy安装', command=numpy) pip_fh = Button(frame,text='返回', command=fh) # pack and label @@ -84,7 +79,6 @@ pip_pyinstaller.pack() pip_tqdm.pack() pip_nuitka.pack() pip_pywin32.pack() -pip_numpy.pack() pip_fh.pack() diff --git a/maths_install.pyw b/maths_install.pyw new file mode 100644 index 0000000..ab0ad6b --- /dev/null +++ b/maths_install.pyw @@ -0,0 +1,35 @@ +from tkinter import * +from tkinter import messagebox +import os + + +root = Tk() +ml = os.getcwd() +file_error = '文件丢失,请重新安装' +install = 'pip install' +ok = '安装成功!' + + +# 创建滚动区域的Canvas对象 +canvas = Canvas(root, width=280, height=280, scrollregion=(0, 0, 500, 500)) + +# 创建可滚动区域的Frame对象,并将其添加到Canvas中 +frame = Frame(canvas) +frame.bind("", lambda e: canvas.configure(scrollregion=canvas.bbox("all"))) +canvas.create_window((0, 0), window=frame, anchor="nw") + +# 创建Scrollbar对象,并将其绑定到Canvas上 +scrollbar = Scrollbar(root, orient="vertical", command=canvas.yview) +canvas.configure(yscrollcommand=scrollbar.set) +scrollbar.pack(side="right", fill="y") + +# 显示Canvas和Scrollbar +canvas.pack(side="left", fill="both", expand=True) + + +# def +def Numpy(): + os.system('pip install numpy -i https://mirrors.aliyun.com/pypi/simple/') + messagebox.showinfo(install, ok) +def scipy(): + pass \ No newline at end of file diff --git a/not_have b/not_have new file mode 100644 index 0000000..8b9598e --- /dev/null +++ b/not_have @@ -0,0 +1 @@ +SciPy Pandas SymPy \ No newline at end of file diff --git a/web_delete.pyw b/web_delete.pyw index 420b779..1fde04b 100644 --- a/web_delete.pyw +++ b/web_delete.pyw @@ -5,7 +5,7 @@ import os # 定义内容和创建主窗口 root = Tk() ml = os.getcwd() -ok2 = '安装成功' +ok2 = '删除成功' uninstall = 'pip uninstall' file_error = '文件丢失,请重新安装'