微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

“jupyter-book build jupyterdays Running Sphinx v2.4.4 loading pickled environment”时失败

如何解决“jupyter-book build jupyterdays Running Sphinx v2.4.4 loading pickled environment”时失败

我正在尝试使用 Jupyter 书籍构建 Github 页面。但是当“jupyter-book build jupyterdays”时代码总是失败。

我首先在 txt 文件中设置要求。并设置一个 .github/workflows 来自动重建 HTML 文件

jupyter-book==0.7.1
ghp-import==0.5.5
plotly==4.8.2
seaborn==0.10.0
numpy==1.18.1
scipy==1.4.1
matplotlib==3.2.2
pandas==1.1.0
scikit-learn==0.23.1
networkx==2.4
Pillow==7.2.0
nltk==3.5
ipython-autotime==0.1
plot-classifier @ git+git://github.com/mgelbart/plot-classifier.git@2bebd4dabfa2412fdec16bf12ed5f06d1f61c91a
graphviz>=0.14

然后我使用下面的“build-and-deploy.yml”来设置工作流程。

name: build-and-deploy

on:
  # Trigger the workflow on push or pull request on master branch
  push:
    branches:
      - SEM

# This job installs dependencies,build the book,and pushes it to `gh-pages`
jobs:
  build-and-deploy-book:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest]
        python-version: [3.7]
    steps:
    - uses: actions/checkout@v2

    # Install dependencies
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        pip install -r requirements.txt
    # Build the book
    - name: Build the book
      run: |
        jupyter-book build jupyterdays
    # Deploy the book's HTML to gh-pages branch
    - name: GitHub Pages action
      uses: peaceiris/actions-gh-pages@v3.6.1
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
        publish_dir: jupyterdays/_build/html

Github deploy 上的错误信息如下: 制作书籍

Run jupyter-book build jupyterdays
Running Sphinx v2.4.4
loading pickled environment... Failed
Failed: No module named 'sphinxcontrib.bibtex.cache'

Extension error:
You must configure the bibtex_bibfiles setting
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.7.9/x64/bin/jupyter-book",line 8,in <module>
    sys.exit(main())
  File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/click/core.py",line 829,in __call__
    return self.main(*args,**kwargs)
  File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/click/core.py",line 782,in main
    rv = self.invoke(ctx)
  File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/click/core.py",line 1259,in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/click/core.py",line 1066,in invoke
    return ctx.invoke(self.callback,**ctx.params)
  File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/click/core.py",line 610,in invoke
    return callback(*args,**kwargs)
  File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/jupyter_book/commands/__init__.py",line 128,in build
    "There was an error in building your book. "
  File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/jupyter_book/utils.py",line 65,in _error
    raise kind(Box)
ValueError: 
===============================================================================

There was an error in building your book. Look above for the error message.

===============================================================================

Error: Process completed with exit code 1.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。