mirror of
https://github.com/yshtcn/heartbeat.git
synced 2025-12-14 18:20:26 +08:00
Update Auto-installer-package.bat
增加自动检查pip和py是否正确安装的功能
This commit is contained in:
parent
78f87ba8a3
commit
aeb6ccb665
@ -1,4 +1,31 @@
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
:: 检查pip
|
||||
for /f "tokens=1" %%i in ('pip --version 2^>^&1 ^| findstr /C:"pip"') do (
|
||||
set PIPVER=%%i
|
||||
)
|
||||
if "!PIPVER!" == "pip" (
|
||||
echo Pip detected!
|
||||
) else (
|
||||
echo Error: pip is not installed.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: 检查python
|
||||
for /f "tokens=1" %%h in ('python --version 2^>^&1') do (
|
||||
set PYVER2=%%h
|
||||
)
|
||||
if "!PYVER2!" == "Python" (
|
||||
echo Python detected!
|
||||
) else (
|
||||
echo Error: Python is not installed.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
endlocal
|
||||
|
||||
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pystray pillow requests configparser PySocks
|
||||
@echo 安装完成
|
||||
pause
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user