Error when building document

I use make latexpdf or make html to build document, appear error below:


done
writing… done
copying images… [100%] build/plot_directive/users/prev_whats_new/whats_new_0-98-4-3.pdf
copying TeX support files… copying TeX support files…
done

Sphinx-Gallery successfully executed 549 out of 551 files subselected by:

gallery_conf[“filename_pattern”] = ‘^((?!sgskip).)*$’
gallery_conf[“ignore_pattern”] = ‘init\.py’

after excluding 0 files that had previously been run (based on MD5).

Extension error:
Here is a summary of the problems encountered when running the examples

Unexpected failing examples:
/home/mc3/matplotlib/examples/axisartist/demo_parasite_axes.py failed leaving traceback:
Traceback (most recent call last):
File “/home/mc3/matplotlib/examples/axisartist/demo_parasite_axes.py”, line 27, in
par1 = host.get_aux_axes(viewlim_mode=None, sharex=host)
TypeError: get_aux_axes() got an unexpected keyword argument ‘sharex’

/home/mc3/matplotlib/examples/lines_bars_and_markers/bar_label_demo.py failed leaving traceback:
Traceback (most recent call last):
File “/home/mc3/matplotlib/examples/lines_bars_and_markers/bar_label_demo.py”, line 117, in
ax.bar_label(
File “/home/mc3/.local/lib/python3.9/site-packages/matplotlib/axes/_axes.py”, line 2768, in bar_label
annotation = self.annotate(fmt % value if lbl is None else lbl,
TypeError: unsupported operand type(s) for %: ‘function’ and ‘float’


make: *** [Makefile:39: latexpdf] Error 1


And just generated Matplotlib.tex, the Matplotlib.pdf not generated.

You need to install the same version of Matplotlib as the documentation you are building; did you do so?

Thanks, I installedmatplotlib 3.6.2 via pip, then download source(matplotlib-3.6.2.tar.gz) from pypi.org;
And try to build again, return another error:

make html

fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
making output directory… done

looking for now-outdated files… none found
pickling environment… done
checking consistency… done
preparing documents… done
writing output… [100%] users/resources/index
generating indices… py-modindex done
writing additional pages… search opensearch done
copying images… [100%] build/plot_directive/users/project/history-2.png
copying downloadable files… [100%] CITATION.bib
copying static files… done
copying extra files… done
dumping search index in English (code: en)… done
dumping object inventory… done
build finished with problems, 3 warnings.

Sphinx-Gallery successfully executed 552 out of 552 files subselected by:

gallery_conf[“filename_pattern”] = ‘^((?!sgskip).)*$’
gallery_conf[“ignore_pattern”] = ‘init\.py’

after excluding 0 files that had previously been run (based on MD5).

embedding documentation hyperlinks…
embedding documentation hyperlinks for gallery… [100%] textbox.html
embedding documentation hyperlinks for tutorials… [100%] sg_execution_times.html
embedding documentation hyperlinks for plot_types… [100%] triplot.html
making refresh html file: resources/index redirect to users/resources/index
make: *** [Makefile:34: html] Error 1

You need to find the WARNING: lines; they are not in your post.

I think something wrong in this:

making refresh html file: resources/index redirect to users/resources/index

No, there is nothing wrong there.