Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
279 views
in Technique[技术] by (71.8m points)

github pages - Failure when "jupyter-book build jupyterdays Running Sphinx v2.4.4 loading pickled environment"

I'm trying to build a Github page with Jupyter book. But the code always fails when "jupyter-book build jupyterdays".

I first set up the requirements in a txt file. And set up a .github/workflows to rebuild HTML files automatically.

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

Then I use the following "build-and-deploy.yml" to set the workflow.

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/[email protected]
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
        publish_dir: jupyterdays/_build/html

The error message on Github deploy is the following: Build the books

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.
question from:https://stackoverflow.com/questions/65623466/failure-when-jupyter-book-build-jupyterdays-running-sphinx-v2-4-4-loading-pickl

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...