readthedocs 找不到requirements.txt

问题描述 投票:0回答:1

.readthedocs.yaml:

python:
  install:
    - requirements: source/requirements.txt

在文档目录中

source
    ├── _static
    ├── _templates
    ├── conf.py
    ├── hardware.rst
    ├── index.rst
    ├── requirements.txt
    └── software.rst

阅读文档构建输出:

python -m pip install --upgrade --no-cache-dir pip setuptools 
python -m pip install --upgrade --no-cache-dir sphinx 
python -m pip install --exists-action=w --no-cache-dir -r source/requirements.txt  
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'source/requirements.txt'

我尝试检查要求拼写,但没有发现任何错误。

python pip python-sphinx read-the-docs
1个回答
0
投票

我认为你应该指定路径,这样的东西可能会起作用:

python:
  install:
    - requirements: source/requirements.txt
    - method: pip
      path: .

确保

.readthedocs.yml
位于目录的底部

© www.soinside.com 2019 - 2024. All rights reserved.