ShopTRAINING/install/install_dependencies.bat
gdtiti c0fe213b70 修复图表显示和数据处理问题
1. 修复前端图表日期排序问题:
   - 改进 PredictionView.vue 和 HistoryView.vue 中的图表渲染逻辑
   - 确保历史数据和预测数据按照正确的日期顺序显示

2. 修复后端API处理:
   - 解决 optimized_kan 模型类型的路径映射问题
   - 添加 JSON 序列化器处理 Pandas Timestamp 对象
   - 改进预测数据与历史数据的衔接处理

3. 优化图表样式和用户体验
2025-06-15 00:01:57 +08:00

46 lines
1.9 KiB
Batchfile
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
chcp 65001 >nul
echo 药店销售预测系统 - 依赖库安装脚本
echo ==================================
echo.
echo 请选择要安装的版本:
echo 1. CPU版本适用于没有NVIDIA GPU的计算机
echo 2. GPU版本 - CUDA 12.1适用于最新的NVIDIA GPU
echo 3. GPU版本 - CUDA 11.8适用于较旧的NVIDIA GPU
echo.
set /p choice=请输入选项 (1/2/3):
if "%choice%"=="1" (
echo 正在安装CPU版本依赖...
pip install -r requirements.txt
) else if "%choice%"=="2" (
echo 正在安装GPU版本(CUDA 12.1)依赖...
echo 首先安装基础依赖...
pip install -r requirements-gpu.txt --no-deps
echo 安装除PyTorch以外的其他依赖...
pip install numpy==2.3.0 pandas==2.3.0 matplotlib==3.10.3 scikit-learn==1.7.0 tqdm==4.67.1 openpyxl==3.1.5
echo 从PyTorch官方源安装CUDA 12.1版本的PyTorch...
pip install torch==2.7.1 --index-url https://download.pytorch.org/whl/cu121
) else if "%choice%"=="3" (
echo 正在安装GPU版本(CUDA 11.8)依赖...
echo 首先安装基础依赖...
pip install -r requirements-gpu-cu118.txt --no-deps
echo 安装除PyTorch以外的其他依赖...
pip install numpy==2.3.0 pandas==2.3.0 matplotlib==3.10.3 scikit-learn==1.7.0 tqdm==4.67.1 openpyxl==3.1.5
echo 从PyTorch官方源安装CUDA 11.8版本的PyTorch...
pip install torch==2.7.1 --index-url https://download.pytorch.org/whl/cu118
) else (
echo 无效的选项!请重新运行脚本并选择正确的选项。
goto end
)
echo.
echo 依赖库安装完成!
echo.
echo 验证PyTorch GPU支持状态...
python -c "import torch; print('CUDA是否可用:', torch.cuda.is_available()); print('PyTorch版本:', torch.__version__); print('GPU数量:', torch.cuda.device_count()); print('GPU名称:', torch.cuda.get_device_name(0) if torch.cuda.is_available() else '无GPU')"
:end
pause