setup_tsinghua.bat 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. @echo off
  2. echo ===================================
  3. echo 使用清华大学镜像安装依赖
  4. echo Installing dependencies using Tsinghua mirror
  5. echo ===================================
  6. echo.
  7. REM Check if Python is installed
  8. python --version >nul 2>&1
  9. if errorlevel 1 (
  10. echo Error: Python is not installed or not in PATH!
  11. echo 错误:未安装Python或Python不在PATH中!
  12. echo Please install Python from https://www.python.org/
  13. pause
  14. exit /b 1
  15. )
  16. echo Installing from Tsinghua University mirror...
  17. echo 正在从清华大学镜像源安装...
  18. echo.
  19. REM Install using Tsinghua mirror
  20. python -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt
  21. if errorlevel 1 (
  22. echo.
  23. echo Installation failed!
  24. echo 安装失败!
  25. pause
  26. exit /b 1
  27. )
  28. echo.
  29. echo ✓ Installation completed successfully!
  30. echo ✓ 安装成功完成!
  31. echo.
  32. echo You can now run the application using: run_app.bat
  33. echo 现在可以使用 run_app.bat 运行应用程序
  34. pause