Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8f99f471f | ||
|
|
c2ca3bc705 | ||
|
|
61736e53eb | ||
|
|
09af622168 | ||
|
|
a0dfeaeb01 | ||
|
|
5ea12cb433 | ||
|
|
0e4ccad068 | ||
|
|
14d13cf813 | ||
|
|
a502a19fcd | ||
|
|
3ddf7424de | ||
|
|
de1e57179e | ||
|
|
65d292fb54 | ||
|
|
738bfe35d6 | ||
|
|
0b7b7585d5 | ||
|
|
8555df53ec | ||
|
|
87f50a7cc1 | ||
|
|
9d00ade094 | ||
|
|
70b1b2245d | ||
|
|
a638d34e4a | ||
|
|
7c6873a729 | ||
|
|
45403f5d3d | ||
|
|
178591eaa9 | ||
|
|
8b4b1186bc | ||
|
|
7a76d4c7c8 | ||
|
|
9da156f37c |
@@ -64,7 +64,7 @@ def fh():
|
||||
# button
|
||||
bt_qt = Button(root, text='pyqt5删除', command=pyqt)
|
||||
bt_pygame = Button(root, text='pygame删除', command=pygame)
|
||||
bt_wxpython = Button(frame, text='wxpython删除', command=wxpython)
|
||||
bt_wx = Button(frame, text='wxpython删除', command=wxpython)
|
||||
bt_kivy = Button(frame, text='kivy删除', command=kivy)
|
||||
bt_pyside = Button(frame, text='pyside6删除', command=pyside6)
|
||||
bt_flexx = Button(frame, text='flexx删除', command=flexx)
|
||||
@@ -83,7 +83,7 @@ bt_matplotlib.pack()
|
||||
bt_seaborn.pack()
|
||||
bt_flexx.pack()
|
||||
bt_pysimpleGUI.pack()
|
||||
bt_wxpython.pack()
|
||||
bt_wx.pack()
|
||||
bt_fh.pack()
|
||||
|
||||
|
||||
|
||||
@@ -27,34 +27,34 @@ canvas.pack(side="left", fill="both", expand=True)
|
||||
|
||||
|
||||
def pyqt5():
|
||||
os.system("pip install pyqt5")
|
||||
os.systen('pip install PyQtWebEngine')
|
||||
os.system("pip install pyqt5 -i https://mirrors.aliyun.com/pypi/simple/")
|
||||
os.systen('pip install PyQtWebEngine -i https://mirrors.aliyun.com/pypi/simple/')
|
||||
messagebox.showinfo(install, ok)
|
||||
def wxpython():
|
||||
os.system("pip install wxpython")
|
||||
os.system("pip install wxpython -i https://mirrors.aliyun.com/pypi/simple/")
|
||||
messagebox.showinfo(install, ok)
|
||||
def pygame():
|
||||
os.system("pip install pygame")
|
||||
os.system("pip install pygame -i https://mirrors.aliyun.com/pypi/simple/")
|
||||
messagebox.showinfo(install, ok)
|
||||
def Matplotlib():
|
||||
os.system('pip install Matplotlib')
|
||||
os.system('pip install Matplotlib -i https://mirrors.aliyun.com/pypi/simple/')
|
||||
messagebox.showinfo(install, ok)
|
||||
def Seaborn():
|
||||
os.system('pip install Seaborn')
|
||||
os.system('pip install Seaborn -i https://mirrors.aliyun.com/pypi/simple/')
|
||||
messagebox.showinfo(install, ok)
|
||||
def fh():
|
||||
root.destroy()
|
||||
def kivy():
|
||||
os.system('pip install kivy')
|
||||
os.system('pip install kivy -i https://mirrors.aliyun.com/pypi/simple/')
|
||||
messagebox.showinfo(install, ok)
|
||||
def pysimpleGUI():
|
||||
os.system('pip install pysimpleGUI')
|
||||
os.system('pip install pysimpleGUI -i https://mirrors.aliyun.com/pypi/simple/')
|
||||
messagebox.showinfo(install, ok)
|
||||
def pyside6():
|
||||
os.system('pip install pyside6')
|
||||
os.system('pip install pyside6 -i https://mirrors.aliyun.com/pypi/simple/')
|
||||
messagebox.showinfo(install ,ok)
|
||||
def flexx():
|
||||
os.system('pip install flexx')
|
||||
os.system('pip install flexx -i https://mirrors.aliyun.com/pypi/simple/d')
|
||||
messagebox.showinfo(install, ok)
|
||||
|
||||
|
||||
|
||||
17
README.md
17
README.md
@@ -2,10 +2,25 @@
|
||||
可以帮助不会使用pip安装库的人准备
|
||||
|
||||
# 使用方式
|
||||
首先在**https://github.com/dengrb1/chatgpt**里面下载最新的版本
|
||||
首先在**https://github.com/dengrb1/pip-helper**里面下载最新的版本
|
||||
|
||||
然后再打开刚刚下载好的文件,然后想平时安装程序一样使用本程序吧!!!
|
||||
|
||||
# 更新日志
|
||||
当前版本:1.6 (Not beta or demo)
|
||||
|
||||
0.1.0 暂无日志
|
||||
1.0 正式版本。修复BUG;改正更新日志显示问题
|
||||
1.1 加入机器学习库安装;修复BUG;删除“关于”模块
|
||||
1.2 加入更多可视化库,都在gui安装和删除类里面;修复一些BUG
|
||||
1.2.1 加入机器学习库——openai;修复BUG;一键安装所有库正在试验中......
|
||||
1.3 加入更多GUI库,比如:pyside6, kivy等等;修复一些BUG
|
||||
1.4 加入pip安装检测;加入更多web类库;修复一些BUG
|
||||
1.5 加入更多机器学习库;修复一些BUG;修改pip安装检测代
|
||||
1.5.1 修改pip源,让下载速度变得更加快速!!
|
||||
1.6 加入更多处理数据库;修复一些BUG;加入WIFI检测;修改更新日志文本放置的位置;加入更新pip包管理工具......
|
||||
|
||||
|
||||
# 作者
|
||||
邮箱:drb12311@163.com
|
||||
|
||||
|
||||
14
client.pyw
14
client.pyw
@@ -1,12 +1,12 @@
|
||||
from tkinter import *
|
||||
from tkinter import messagebox
|
||||
import platform
|
||||
import sys
|
||||
from subprocess import call
|
||||
import os
|
||||
|
||||
|
||||
root = Tk()
|
||||
ml = os.getcwd()
|
||||
System = platform.system()
|
||||
file_error = '文件丢失,请重新安装'
|
||||
|
||||
|
||||
@@ -16,7 +16,9 @@ def jc(exe_name):
|
||||
else:
|
||||
messagebox.showerror('system',file_error)
|
||||
pass
|
||||
|
||||
def update_pip():
|
||||
os.system('pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade pip')
|
||||
messagebox.showinfo('pip helper','更新pip包管理器成功!')
|
||||
def install():
|
||||
jc("install")
|
||||
|
||||
@@ -38,12 +40,14 @@ def eyeryone():
|
||||
Label(root, text='pip_helper').pack()
|
||||
Button(root, text='安装模式', command=install).pack()
|
||||
Button(root, text='删除模式', command=delete).pack()
|
||||
Button(root, text='全部安装或删除', command=eyeryone).pack()
|
||||
Button(root, text='更新pip包管理工具', command=update_pip).pack()
|
||||
Button(root, text='更新日志', command=update).pack()
|
||||
Button(root, text='退出', command=exit_exe).pack()
|
||||
|
||||
Label(root, text='version 1.6 @2023-2024 dengrb1').pack()
|
||||
|
||||
|
||||
# mainloop
|
||||
root.title('启动器')
|
||||
root.title('选择')
|
||||
root.geometry('200x220+400+400')
|
||||
root.mainloop()
|
||||
@@ -28,25 +28,25 @@ canvas.pack(side="left", fill="both", expand=True)
|
||||
|
||||
# def
|
||||
def tensorFlow():
|
||||
os.system('pip install TensorFlow')
|
||||
os.system('pip install TensorFlow -i https://mirrors.aliyun.com/pypi/simple/')
|
||||
messagebox.showinfo(install, ok)
|
||||
def pytorch():
|
||||
os.system('pip install pytorch')
|
||||
os.system('pip install pytorch -i https://mirrors.aliyun.com/pypi/simple/')
|
||||
messagebox.showinfo(install, ok)
|
||||
def openai():
|
||||
os.system('pip install openai')
|
||||
os.system('pip install openai -i https://mirrors.aliyun.com/pypi/simple/')
|
||||
messagebox.showinfo(install, ok)
|
||||
def keras():
|
||||
os.system('pip install keras')
|
||||
os.system('pip install keras -i https://mirrors.aliyun.com/pypi/simple/')
|
||||
messagebox.showinfo(install, ok)
|
||||
def scikit_learn():
|
||||
os.system('pip install scikit-learn')
|
||||
os.system('pip install scikit-learn -i https://mirrors.aliyun.com/pypi/simple/')
|
||||
messagebox.showinfo(install, ok)
|
||||
def lightGBM():
|
||||
os.system('pip install lightGBM')
|
||||
os.system('pip install lightGBM -i https://mirrors.aliyun.com/pypi/simple/')
|
||||
messagebox.showinfo(install, ok)
|
||||
def CatBoost():
|
||||
os.system('pip install CatBoost')
|
||||
os.system('pip install CatBoost -i https://mirrors.aliyun.com/pypi/simple/')
|
||||
messagebox.shir
|
||||
def fh():
|
||||
root.destroy()
|
||||
|
||||
22
delete.pyw
22
delete.pyw
@@ -7,7 +7,7 @@ root = Tk()
|
||||
ml = os.getcwd()
|
||||
file_error = '文件丢失,请重新安装'
|
||||
uninstall = 'pip uninstall'
|
||||
ok2 = '删除完成'
|
||||
ok = '删除完成'
|
||||
|
||||
# 创建滚动区域的Canvas对象
|
||||
canvas = Canvas(root, width=280, height=280, scrollregion=(0, 0, 500, 500))
|
||||
@@ -39,40 +39,48 @@ def web_delete():
|
||||
pass
|
||||
def computer_delete():
|
||||
open_exe('computer_delete')
|
||||
def maths_delete():
|
||||
open_exe('maths_delete')
|
||||
def pyinstaller_remove():
|
||||
os.system('pip uninstall pyinstaller')
|
||||
messagebox.showinfo('pip uninstall', ok2)
|
||||
messagebox.showinfo('pip uninstall', ok)
|
||||
pass
|
||||
def tqdm_remove():
|
||||
os.system('pip uninstall tqdm')
|
||||
messagebox.showinfo('pip uninstall', ok2)
|
||||
messagebox.showinfo('pip uninstall', ok)
|
||||
pass
|
||||
def nuitka_remove():
|
||||
os.system('pip uninstall nuitka')
|
||||
messagebox.showinfo(uninstall, ok2)
|
||||
messagebox.showinfo(uninstall, ok)
|
||||
pass
|
||||
def pywin32_remove():
|
||||
os.system('pip uninstall pywin32')
|
||||
messagebox.showinfo(uninstall, ok2)
|
||||
messagebox.showinfo(uninstall, ok)
|
||||
pass
|
||||
def numpy_remove():
|
||||
os.system('pip uninstall numpy')
|
||||
messagebox.showinfo(uninstall, ok2)
|
||||
messagebox.showinfo(uninstall, ok)
|
||||
pass
|
||||
def pygithub_remove():
|
||||
os.system('pip uninstall pygithub')
|
||||
messagebox.showinfo(uninstall, ok)
|
||||
def fh():
|
||||
root.destroy()
|
||||
|
||||
|
||||
# Button
|
||||
Label(root, text='删除模式')
|
||||
remove_fh = Button(frame, text='返回', command=fh).pack()
|
||||
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_maths = Button(frame, text='maths类删除', command=maths_delete).pack()
|
||||
remove_pyinstaller = Button(frame, text='pyinstaller删除', command=pyinstaller_remove).pack()
|
||||
remove_tqdm = Button(frame, text='tqdm删除', command=tqdm_remove).pack()
|
||||
remove_pygithub = Button(frame, text='pygithub删除', command=pygithub_remove).pack()
|
||||
remove_nuitka = Button(frame, text='nuitka删除', command=nuitka_remove).pack()
|
||||
remove_pywin32 = Button(frame, text='pywin32删除', command=pywin32_remove).pack()
|
||||
remove_numpy = Button(frame ,text="numpy删除", command=numpy_remove).pack()
|
||||
remove_fh = Button(frame, text='返回', command=fh).pack()
|
||||
|
||||
|
||||
# pack
|
||||
|
||||
48
install.pyw
48
install.pyw
@@ -8,6 +8,7 @@ ml = os.getcwd()
|
||||
ok = '安装成功'
|
||||
install = 'pip install'
|
||||
file_error = '文件丢失,请重新安装'
|
||||
i = '-i https://mirrors.aliyun.com/pypi/simple/'
|
||||
|
||||
|
||||
# 创建滚动区域的Canvas对象
|
||||
@@ -41,39 +42,54 @@ def web_install():
|
||||
open_exe('web_install')
|
||||
def computer_install():
|
||||
open_exe('computer_install')
|
||||
def maths_install():
|
||||
open_exe('maths_install')
|
||||
def pyinstaller():
|
||||
os.system('pip install pyinstaller')
|
||||
os.system('pip install pyinstaller -i https://mirrors.aliyun.com/pypi/simple/')
|
||||
messagebox.showinfo('pip install', ok)
|
||||
pass
|
||||
def nuitka():
|
||||
os.system('pip install nuitka')
|
||||
os.system('pip install nuitka -i https://mirrors.aliyun.com/pypi/simple/')
|
||||
messagebox.showinfo('pip install', ok)
|
||||
pass
|
||||
def pywin32():
|
||||
os.system('pip install pywin32')
|
||||
os.system('pip install pywin32 -i https://mirrors.aliyun.com/pypi/simple/')
|
||||
messagebox.showinfo(install, ok)
|
||||
pass
|
||||
def tqdm():
|
||||
os.system('pip install 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')
|
||||
def pygithub():
|
||||
os.system(f'pip install pygithub {i}')
|
||||
messagebox.showinfo(install,ok)
|
||||
pass
|
||||
def fh():
|
||||
root.destroy()
|
||||
|
||||
# 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()
|
||||
pip_pywin32 = Button(frame, text='pywin32安装', command=pywin32).pack()
|
||||
pip_numpy = Button(frame, text='numpy安装', command=numpy).pack()
|
||||
pip_fh = Button(frame,text='返回', command=fh).pack()
|
||||
pip_gui = Button(frame, text='GUI类安装', command=gui_install)
|
||||
pip_web = Button(frame, text='web类安装', command=web_install)
|
||||
pip_computer = Button(frame, text='机器学习类库安装', command=computer_install)
|
||||
pip_maths = Button(frame, text='maths类安装', command=maths_install)
|
||||
pip_pyinstaller = Button(frame, text='pyinstaller安装', command=pyinstaller)
|
||||
pip_tqdm = Button(frame, text='tqdm安装', command=tqdm)
|
||||
pip_pygithub = Button(frame, text='pygithub安装', command=pygithub)
|
||||
pip_nuitka = Button(frame, text='nuitka安装', command=nuitka)
|
||||
pip_pywin32 = Button(frame, text='pywin32安装', command=pywin32)
|
||||
pip_fh = Button(frame,text='返回', command=fh)
|
||||
|
||||
# pack and label
|
||||
Label(root, text='安装模式').pack()
|
||||
pip_fh.pack()
|
||||
pip_gui.pack()
|
||||
pip_web.pack()
|
||||
pip_computer.pack()
|
||||
pip_maths.pack()
|
||||
pip_pyinstaller.pack()
|
||||
pip_tqdm.pack()
|
||||
pip_pygithub.pack()
|
||||
pip_nuitka.pack()
|
||||
pip_pywin32.pack()
|
||||
|
||||
|
||||
# mainloop
|
||||
|
||||
73
maths_delete.pyw
Normal file
73
maths_delete.pyw
Normal file
@@ -0,0 +1,73 @@
|
||||
from tkinter import *
|
||||
from tkinter import messagebox
|
||||
import os
|
||||
|
||||
|
||||
root = Tk()
|
||||
ml = os.getcwd()
|
||||
file_error = '文件丢失,请重新安装'
|
||||
uninstall = 'pip uninstall'
|
||||
ok = '删除成功!'
|
||||
i = '-i https://mirrors.aliyun.com/pypi/simple/'
|
||||
|
||||
|
||||
# 创建滚动区域的Canvas对象
|
||||
canvas = Canvas(root, width=280, height=280, scrollregion=(0, 0, 500, 500))
|
||||
|
||||
# 创建可滚动区域的Frame对象,并将其添加到Canvas中
|
||||
frame = Frame(canvas)
|
||||
frame.bind("<Configure>", 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 open_exe(exe_name):
|
||||
if os.path.exists(os.path.join(ml, f"{exe_name}.exe")):
|
||||
os.system(f"start {exe_name}.exe")
|
||||
else:
|
||||
messagebox.showerror('pip helper', file_error)
|
||||
pass
|
||||
def Numpy():
|
||||
os.system('pip uninstall numpy')
|
||||
messagebox.showinfo(uninstall, ok)
|
||||
def scipy():
|
||||
os.system(f'pip uninstall scipy')
|
||||
messagebox.showinfo(uninstall, ok)
|
||||
def sympy():
|
||||
os.system(f'pip uninstall sympy')
|
||||
messagebox.showinfo(uninstall, ok)
|
||||
def pandas():
|
||||
os.system(f'pip uninstall pandas')
|
||||
messagebox.showinfo(uninstall, ok)
|
||||
def fh():
|
||||
root.destroy()
|
||||
|
||||
|
||||
# Button
|
||||
bt_n = Button(frame, text='Numpy删除', command=Numpy)
|
||||
bt_scipy = Button(frame, text='scipy删除', command=scipy)
|
||||
bt_sympy = Button(frame, text='sympy删除', command=sympy)
|
||||
bt_pandas = Button(frame, text='pandas删除', command=pandas)
|
||||
bt_fh = Button(frame, text='返回', command=fh)
|
||||
|
||||
# pack and Label
|
||||
Label(root, text='计算类删除')
|
||||
bt_fh.pack()
|
||||
bt_n.pack()
|
||||
bt_scipy.pack()
|
||||
bt_sympy.pack()
|
||||
bt_pandas.pack()
|
||||
|
||||
|
||||
# mainloop
|
||||
root.title('删除')
|
||||
root.geometry('200x200+400+100')
|
||||
root.mainloop()
|
||||
73
maths_install.pyw
Normal file
73
maths_install.pyw
Normal file
@@ -0,0 +1,73 @@
|
||||
from tkinter import *
|
||||
from tkinter import messagebox
|
||||
import os
|
||||
|
||||
|
||||
root = Tk()
|
||||
ml = os.getcwd()
|
||||
file_error = '文件丢失,请重新安装'
|
||||
install = 'pip install'
|
||||
ok = '安装成功!'
|
||||
i = '-i https://mirrors.aliyun.com/pypi/simple/'
|
||||
|
||||
|
||||
# 创建滚动区域的Canvas对象
|
||||
canvas = Canvas(root, width=280, height=280, scrollregion=(0, 0, 500, 500))
|
||||
|
||||
# 创建可滚动区域的Frame对象,并将其添加到Canvas中
|
||||
frame = Frame(canvas)
|
||||
frame.bind("<Configure>", 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 open_exe(exe_name):
|
||||
if os.path.exists(os.path.join(ml, f"{exe_name}.exe")):
|
||||
os.system(f"start {exe_name}.exe")
|
||||
else:
|
||||
messagebox.showerror('pip helper', file_error)
|
||||
pass
|
||||
def Numpy():
|
||||
os.system('pip install numpy -i https://mirrors.aliyun.com/pypi/simple/')
|
||||
messagebox.showinfo(install, ok)
|
||||
def scipy():
|
||||
os.system(f'pip install scipy {i}')
|
||||
messagebox.showinfo(install, ok)
|
||||
def sympy():
|
||||
os.system(f'pip install sympy {i}')
|
||||
messagebox.showinfo(install, ok)
|
||||
def pandas():
|
||||
os.system(f'pip install pandas {i}')
|
||||
messagebox.showinfo(install, ok)
|
||||
def fh():
|
||||
root.destroy()
|
||||
|
||||
|
||||
# Button
|
||||
bt_n = Button(frame, text='Numpy安装', command=Numpy)
|
||||
bt_scipy = Button(frame, text='scipy安装', command=scipy)
|
||||
bt_sympy = Button(frame, text='sympy安装', command=sympy)
|
||||
bt_pandas = Button(frame, text='pandas安装', command=pandas)
|
||||
bt_fh = Button(frame, text='返回', command=fh)
|
||||
|
||||
# pack and Label
|
||||
Label(root, text='计算类安装')
|
||||
bt_fh.pack()
|
||||
bt_n.pack()
|
||||
bt_scipy.pack()
|
||||
bt_sympy.pack()
|
||||
bt_pandas.pack()
|
||||
|
||||
|
||||
# mainloop
|
||||
root.title('install')
|
||||
root.geometry('200x200+10+100')
|
||||
root.mainloop()
|
||||
97
python_jc.py
97
python_jc.py
@@ -1,27 +1,108 @@
|
||||
import sys
|
||||
import os
|
||||
from time import sleep
|
||||
import urllib.request
|
||||
import webbrowser
|
||||
from time import sleep, strftime
|
||||
|
||||
|
||||
ml = os.getcwd()
|
||||
file_error = '文件丢失,请重新安装!!'
|
||||
ERROR_MSG = '错误:'
|
||||
|
||||
|
||||
# def
|
||||
def open_exe(exe_name):
|
||||
if os.path.exists(os.path.join(ml, f"{exe_name}.exe")):
|
||||
os.system(f"start {exe_name}.exe")
|
||||
else:
|
||||
print(file_error)
|
||||
sleep(1)
|
||||
pass
|
||||
|
||||
|
||||
# try
|
||||
def check_internet(url='http://www.baidu.com/', timeout=5):
|
||||
try:
|
||||
import pip
|
||||
urllib.request.urlopen(url, timeout=timeout)
|
||||
open_exe('client')
|
||||
except ImportError:
|
||||
print("请安装Pip或者python")
|
||||
sleep(2)
|
||||
return True
|
||||
except Exception as e:
|
||||
print(f'{ERROR_MSG}{strftime("%Y-%m-%d %H:%M:%S")}: WIFI连接不正常,请检测wifi连接后再试吧')
|
||||
sleep(5)
|
||||
print('是否继续启动程序(Y.是,N.不是)?')
|
||||
input_xz = str(input('>>>'))
|
||||
if input_xz != None:
|
||||
if input_xz.lower() == 'y':
|
||||
open_exe('client')
|
||||
elif input_xz.lower() == 'n':
|
||||
sys.exit()
|
||||
else:
|
||||
print('请输入英文字母!!')
|
||||
sleep(1.5)
|
||||
else:
|
||||
print('错误:没有输入文字')
|
||||
sleep(1.5)
|
||||
return False
|
||||
|
||||
|
||||
'''def check_python_installation():
|
||||
if sys.version_info.major < 3:
|
||||
python_path = None
|
||||
# 检查是否有 Python 安装目录
|
||||
for path in os.environ['PATH'].split(os.pathsep):
|
||||
python_exe = os.path.join(path, 'python.exe')
|
||||
if os.path.isfile(python_exe):
|
||||
python_path = os.path.dirname(python_exe)
|
||||
break
|
||||
|
||||
if python_path:
|
||||
print(f'{ERROR_MSG}{strftime("%Y-%m-%d %H:%M:%S")}: Python已安装,但版本太低,请安装 Python 3.x 版本')
|
||||
webbrowser.open('https://python.org/downloads/')
|
||||
else:
|
||||
print(f'{ERROR_MSG}{strftime("%Y-%m-%d %H:%M:%S")}: Python未安装,请安装 Python 3.x 版本')
|
||||
webbrowser.open('https://python.org/downloads/')
|
||||
|
||||
print('是否继续启动程序(Y.是,N.不是)?')
|
||||
input_xz = str(input('>>>'))
|
||||
if input_xz != None:
|
||||
if input_xz.lower() == 'y':
|
||||
open_exe('client')
|
||||
elif input_xz.lower() == 'n':
|
||||
sys.exit()
|
||||
else:
|
||||
print('请输入英文字母!!')
|
||||
sleep(1.5)
|
||||
else:
|
||||
print('错误:没有输入文字,默认退出!')
|
||||
sleep(1.5)
|
||||
sys.exit()
|
||||
else:
|
||||
python_path = None
|
||||
for path in os.environ['PATH'].split(os.pathsep):
|
||||
python_exe = os.path.join(path, 'python.exe')
|
||||
if os.path.isfile(python_exe):
|
||||
python_path = os.path.dirname(python_exe)
|
||||
break
|
||||
|
||||
if python_path:
|
||||
print('自检正常!')
|
||||
open_exe('client')
|
||||
else:
|
||||
print(f'{ERROR_MSG}{strftime("%Y-%m-%d %H:%M:%S")}: Python未安装,请安装 Python 3.x 版本')
|
||||
webbrowser.open('https://python.org/downloads/')
|
||||
|
||||
print('是否继续启动程序(Y.是,N.不是)?')
|
||||
input_xz = str(input('>>>'))
|
||||
if input_xz != None:
|
||||
if input_xz.lower() == 'y':
|
||||
open_exe('client')
|
||||
elif input_xz.lower() == 'n':
|
||||
sys.exit()
|
||||
else:
|
||||
print('请输入英文字母!!')
|
||||
sleep(1.5)
|
||||
else:
|
||||
print('错误:没有输入文字,默认退出!')
|
||||
sleep(1.5)
|
||||
sys.exit()'''
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
check_internet()
|
||||
18
update.pyw
18
update.pyw
@@ -5,20 +5,27 @@ from tkinter import *
|
||||
from tkinter.scrolledtext import ScrolledText
|
||||
import webbrowser
|
||||
from tkinter import messagebox
|
||||
import os
|
||||
|
||||
root = Tk()
|
||||
ml = os.getcwd()
|
||||
|
||||
def quit_exe():
|
||||
root.destroy()
|
||||
def update_now():
|
||||
webbrowser.open("https://kgithub.com/dengrb1/pip-helper/releases/")
|
||||
messagebox.showinfo('update', '请选择最新版本并下载运行安装程序,然后就可以更新了!')
|
||||
'''if os.path.exists(os.path.join(ml, "downloads_update_now.exe")):
|
||||
os.startfile("downloads_update_now.exe")
|
||||
else:
|
||||
messagebox.showerror('error','错误:文件不存在')'''
|
||||
messagebox.showerror('update', '在线更新模块正在更新,请以后再试吧')
|
||||
|
||||
# Label
|
||||
update_now_bt = Button(root ,text='在线更新', command=update_now).pack(side=RIGHT)
|
||||
quit_bt = Button(root, text='返回', command=quit_exe).pack(side=RIGHT)
|
||||
Label(root, text='更新日志').pack()
|
||||
text = '''0.1.0 暂无日志
|
||||
text = '''当前版本:1.7 (Not beta or demo)
|
||||
|
||||
0.1.0 暂无日志
|
||||
1.0 正式版本。修复BUG;改正更新日志显示问题
|
||||
1.1 加入机器学习库安装;修复BUG;删除“关于”模块
|
||||
1.2 加入更多可视化库,都在gui安装和删除类里面;修复一些BUG
|
||||
@@ -26,8 +33,9 @@ text = '''0.1.0 暂无日志
|
||||
1.3 加入更多GUI库,比如:pyside6, kivy等等;修复一些BUG
|
||||
1.4 加入pip安装检测;加入更多web类库;修复一些BUG
|
||||
1.5 加入更多机器学习库;修复一些BUG;修改pip安装检测代
|
||||
|
||||
当前版本:1.5 (Not beta or demo)'''
|
||||
1.5.1 修改pip源,让下载速度变得更加快速!!
|
||||
1.6 加入更多处理数据库;修复一些BUG;加入WIFI检测;修改更新日志文本放置的位置;加入更新pip包管理工具......
|
||||
1.7 加入pygithub库;“在线更新”模块改为正式版;修复一些BUG'''
|
||||
|
||||
text_box = ScrolledText(root)
|
||||
text_box.pack(fill=BOTH, expand=1)
|
||||
|
||||
@@ -5,7 +5,7 @@ import os
|
||||
# 定义内容和创建主窗口
|
||||
root = Tk()
|
||||
ml = os.getcwd()
|
||||
ok2 = '安装成功'
|
||||
ok2 = '删除成功'
|
||||
uninstall = 'pip uninstall'
|
||||
file_error = '文件丢失,请重新安装'
|
||||
|
||||
|
||||
@@ -29,11 +29,11 @@ canvas.pack(side="left", fill="both", expand=True)
|
||||
|
||||
# def
|
||||
def Requests():
|
||||
os.system('pip install Requests')
|
||||
os.system('pip install Requests -i https://mirrors.aliyun.com/pypi/simple/')
|
||||
messagebox.showinfo('pip install', ok)
|
||||
pass
|
||||
def django():
|
||||
os.system('pip install django')
|
||||
os.system('pip install django -i https://mirrors.aliyun.com/pypi/simple/')
|
||||
messagebox.showinfo(install, ok)
|
||||
pass
|
||||
def open_exe(exe_name):
|
||||
@@ -44,16 +44,16 @@ def open_exe(exe_name):
|
||||
pass
|
||||
pass
|
||||
def fastAPI():
|
||||
os.system('pip install fastapi')
|
||||
os.system('pip install fastapi -i https://mirrors.aliyun.com/pypi/simple/')
|
||||
messagebox.showinfo(install, ok)
|
||||
def sanic():
|
||||
os.system('pip install sanic')
|
||||
os.system('pip install sanic -i https://mirrors.aliyun.com/pypi/simple/')
|
||||
messagebox.showinfo(install, ok)
|
||||
def nameko():
|
||||
os.system('pip install nameko')
|
||||
os.system('pip install nameko -i https://mirrors.aliyun.com/pypi/simple/')
|
||||
messagebox.showinfo(install, ok)
|
||||
def pydantic():
|
||||
os.system('pip install pydantic')
|
||||
os.system('pip install pydantic -i https://mirrors.aliyun.com/pypi/simple/')
|
||||
messagebox.showinfo(install, ok)
|
||||
def fh():
|
||||
root.destroy()
|
||||
@@ -79,7 +79,6 @@ bt_sanic.pack()
|
||||
bt_nameko.pack()
|
||||
bt_pydantic.pack()
|
||||
bt_fh.pack()
|
||||
bt_fh.pack()
|
||||
|
||||
|
||||
# mainloop
|
||||
|
||||
Reference in New Issue
Block a user