Skip to content

[Bug] install-cn.ps1 使用清华源安装依赖出现 403,手动进venv改用阿里云源下载后成功 #759

Description

@Gsu-InC

问题描述

运行 install-cn.ps1 安装依赖时,清华源报 403 错误。

复现步骤

1.从 GitHub 克隆 Akegarasu/lora-scripts 仓库。
2.右键install-cn.ps1 -> 使用PowerShell运行

环境信息

  • 操作系统:Windows11
  • Python version: 3.11.8 和3.13.13(均报错)

错误日志

ERROR: HTTP error 403 while getting https://pypi.tuna.tsinghua.edu.cn/packages/eb/62/c321f13b5ba1819fc8dca456c7fce578da2dcfecff1abbf0eaddf8406c0f/pandas-3.0.3-cp311-cp311-win_amd64.whl (from https://pypi.tuna.tsinghua.edu.cn/simple/pandas/) (requires-python:>=3.11)
ERROR: Could not install requirement pandas from https://pypi.tuna.tsinghua.edu.cn/packages/eb/62/c321f13b5ba1819fc8dca456c7fce578da2dcfecff1abbf0eaddf8406c0f/pandas-3.0.3-cp311-cp311-win_amd64.whl (from -r requirements.txt (line 30)) because of HTTP error 403 Client Error: Forbidden for url: https://pypi.tuna.tsinghua.edu.cn/packages/eb/62/c321f13b5ba1819fc8dca456c7fce578da2dcfecff1abbf0eaddf8406c0f/pandas-3.0.3-cp311-cp311-win_amd64.whl for URL https://pypi.tuna.tsinghua.edu.cn/packages/eb/62/c321f13b5ba1819fc8dca456c7fce578da2dcfecff1abbf0eaddf8406c0f/pandas-3.0.3-cp311-cp311-win_amd64.whl (from https://pypi.tuna.tsinghua.edu.cn/simple/pandas/) (requires-python:>=3.11)

临时解决方案:手动安装

1.打开PowerShell
2.cd your_path/lora_scripts 进入 lora_scripts 文件夹
3. .\venv\Scripts\activate 激活脚本报错前创造的虚拟环境
4.pip install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com

建议

为脚本增加备用镜像源和403报错自动切换备用源机制

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions