【发布时间】:2021-10-29 20:13:06
【问题描述】:
我正在尝试构建一个关于 ReadTheDocs 的项目。我正在使用一个非常基本的.readthedocs.yaml 文件,内容如下:
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Set the version of Python and other tools you might need
build:
os: ubuntu-20.04
tools:
python: "3.9"
# You can also specify other tool versions:
# nodejs: "16"
# rust: "1.55"
# golang: "1.17"
# Build documentation in the docs/ directory with Sphinx
sphinx:
builder: html
configuration: docs/source/conf.py
fail_on_warning: true
# If using Sphinx, optionally build your docs in additional formats such as PDF
# formats:
# - pdf
# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt
conda:
environment: environment.yml
不幸的是,RTD 构建日志似乎告诉我,在克隆并写出 environment.yml 文件后,构建过程运行 python env create --quiet --name develop --file environment.yml。这显然因“没有这样的文件或目录”(错误 2)而失败,因为目录结构中不存在 env 这样的文件或目录。 RTD 不应该在这里运行conda create 吗?如何让它做正确的事?
谢谢, 以利
【问题讨论】:
-
我不知道,但我会先阅读他们的文档:docs.readthedocs.io/en/stable/guides/conda.html。我还将使用最小的设置并逐步添加部件以隔离出问题的地方。
标签: python read-the-docs