read-the-docs에서 Sphinx 문서 빌드는 다음 오류 (아래 완전한 로그)와 함께 실패합니다.
ImportError: cannot import name 'PackageFinder' from 'pip._internal.index' (/home/docs/checkouts/readthedocs.org/user_builds/cascade-python/envs/latest/lib/python3.7/site-packages/pip/_internal/index/__init__.py)
내가 잘못 했습니까? 문서 읽기의 버그입니까?
스핑크스 문서의 로컬 빌드는 정상적으로 실행됩니다.
read-the-docs에서 완전한 오류 로그 :
Read the Docs build information
Build id: 10299638
Project: cascade-python
Version: latest
Commit: a7d50bf781bd8076b10dd7024db4ccb628016c27
Date: 2020-01-21T17:03:12.876711Z
State: finished
Success: False
[rtd-command-info] start-time: 2020-01-21T17:03:13.203354Z, end-time: 2020-01-21T17:03:13.215400Z, duration: 0, exit-code: 0
git remote set-url origin https://github.com/brunorijsman/cascade-python.git
[rtd-command-info] start-time: 2020-01-21T17:03:13.276220Z, end-time: 2020-01-21T17:03:13.630658Z, duration: 0, exit-code: 0
git fetch origin --force --tags --prune --prune-tags --depth 50
From https://github.com/brunorijsman/cascade-python
2a28505..a7d50bf master -> origin/master
[rtd-command-info] start-time: 2020-01-21T17:03:13.824496Z, end-time: 2020-01-21T17:03:13.876904Z, duration: 0, exit-code: 0
git checkout --force origin/master
Previous HEAD position was 2a28505 Fix lint
HEAD is now at a7d50bf Trigger docs build
[rtd-command-info] start-time: 2020-01-21T17:03:13.941290Z, end-time: 2020-01-21T17:03:13.951085Z, duration: 0, exit-code: 0
git clean -d -f -f
[rtd-command-info] start-time: 2020-01-21T17:03:16.657644Z, end-time: 2020-01-21T17:03:22.489740Z, duration: 5, exit-code: 0
python3.7 -mvirtualenv --no-site-packages --no-download /home/docs/checkouts/readthedocs.org/user_builds/cascade-python/envs/latest
Using base prefix '/home/docs/.pyenv/versions/3.7.3'
New python executable in /home/docs/checkouts/readthedocs.org/user_builds/cascade-python/envs/latest/bin/python3.7
Not overwriting existing python script /home/docs/checkouts/readthedocs.org/user_builds/cascade-python/envs/latest/bin/python (you must use /home/docs/checkouts/readthedocs.org/user_builds/cascade-python/envs/latest/bin/python3.7)
Installing setuptools, pip, wheel...
done.
[rtd-command-info] start-time: 2020-01-21T17:03:22.562608Z, end-time: 2020-01-21T17:03:23.258281Z, duration: 0, exit-code: 1
/home/docs/checkouts/readthedocs.org/user_builds/cascade-python/envs/latest/bin/python -m pip install --upgrade --cache-dir /home/docs/checkouts/readthedocs.org/user_builds/cascade-python/.cache/pip pip
Traceback (most recent call last):
File "/home/docs/.pyenv/versions/3.7.3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/home/docs/.pyenv/versions/3.7.3/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/docs/checkouts/readthedocs.org/user_builds/cascade-python/envs/latest/lib/python3.7/site-packages/pip/__main__.py", line 16, in <module>
from pip._internal import main as _main # isort:skip # noqa
File "/home/docs/checkouts/readthedocs.org/user_builds/cascade-python/envs/latest/lib/python3.7/site-packages/pip/_internal/__init__.py", line 40, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "/home/docs/checkouts/readthedocs.org/user_builds/cascade-python/envs/latest/lib/python3.7/site-packages/pip/_internal/cli/autocompletion.py", line 8, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "/home/docs/checkouts/readthedocs.org/user_builds/cascade-python/envs/latest/lib/python3.7/site-packages/pip/_internal/cli/main_parser.py", line 12, in <module>
from pip._internal.commands import (
File "/home/docs/checkouts/readthedocs.org/user_builds/cascade-python/envs/latest/lib/python3.7/site-packages/pip/_internal/commands/__init__.py", line 6, in <module>
from pip._internal.commands.completion import CompletionCommand
File "/home/docs/checkouts/readthedocs.org/user_builds/cascade-python/envs/latest/lib/python3.7/site-packages/pip/_internal/commands/completion.py", line 6, in <module>
from pip._internal.cli.base_command import Command
File "/home/docs/checkouts/readthedocs.org/user_builds/cascade-python/envs/latest/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 25, in <module>
from pip._internal.index import PackageFinder
ImportError: cannot import name 'PackageFinder' from 'pip._internal.index' (/home/docs/checkouts/readthedocs.org/user_builds/cascade-python/envs/latest/lib/python3.7/site-packages/pip/_internal/index/__init__.py)
답변
이 문제와 수정 사항은 read-the-docs 문제 # 6554 ( https://github.com/readthedocs/readthedocs.org/issues/6554 )에 설명되어 있습니다.
pip 20.0으로의 자동 업그레이드 (# 4823 이후)가 버그이기 때문에 현재 모든 빌드가 실패합니다 (pypa / pip # 7620 참조). 이제 다른 사람들에게 문제를 해결 한 것으로 보이는 20.0.1 릴리스가 있습니다 …하지만 어떻게 readthedocs를 .1 버전으로 업그레이드하도록 할 수 있습니까?
수정 사항은 다음과 같이 빌드 환경을 지우는 것입니다 ( https://docs.readthedocs.io/en/stable/guides/wipe-environment.html 에서 가져옴 ).
- 독해에 로그인
- 버전으로 이동
- 페이지 오른쪽에서 지우려는 버전의 편집 버튼을 클릭하십시오.
- 페이지 하단으로 이동하여 “저장”버튼 옆에있는 지우기 링크를 클릭하십시오.
- 이제 새로운 빌드 환경으로 버전을 다시 빌드 할 수 있습니다!
이 수정은 저에게 효과적이었습니다 (그러나 20-Jan-2020 현재 모든 빌드마다 환경을 정리해야합니다-아래 Grimmy의 의견 참조).