Building the documentation

I am trying to set up a clean environment for contributing to PyMC3 development. In particular, I am trying to build the documentation locally.

I followed the instructions in CONTRIBUTING.md and created a dedicated conda environment from conda_envs\environment-dev-py39.yaml, which installs all necessary packages. The process completed without errors.

However, when running the make.bat file in pymc3\docs\source, the follow error appears:

(pymc3-dev-py39) PS C:\Users\qwer\Documents\Work\code\PyMC3\docs\source> ./make.bat html
Running Sphinx v3.5.4
You are running the v4 development version of PyMC3 which currently still lacks key features. You probably want to use the stable v3 instead which you can either install via conda or find on the v3 GitHub branch: https://github.com/pymc-devs/pymc3/tree/v3
WARNING (aesara.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
making output directory... done
WARNING: html_static_path entry '_static' does not exist
WARNING: html_static_path entry 'nb_tutorials/_images' does not exist
WARNING: html_static_path entry 'nb_examples/_images' does not exist
loading intersphinx inventory from https://arviz-devs.github.io/arviz/objects.inv...

Extension error (gallery_generator):
Handler <function main at 0x000001730458F790> for event 'builder-inited' threw an exception (exception: 'charmap' codec can't decode byte 0x9d in position 38243: character maps to <undefined>)

The non-existing directories are not an issue, it’s the error thrown by a Spinx extension. Any suggestions on how to get around this?

For completeness, here is the output from conda list for the pymc3-dev-py39 environment:

output
aesara                    2.1.3            py39h7fcc1c2_1    conda-forge    
alabaster                 0.7.12                     py_0    conda-forge    
anyio                     3.3.0            py39hcbf5309_0    conda-forge    
appdirs                   1.4.4              pyh9f0ad1d_0    conda-forge    
argon2-cffi               20.1.0           py39hb82d6ee_2    conda-forge    
arviz                     0.11.2             pyhd8ed1ab_1    conda-forge    
async_generator           1.10                       py_0    conda-forge    
atomicwrites              1.4.0              pyh9f0ad1d_0    conda-forge    
attrs                     20.3.0             pyhd3deb0d_0    conda-forge    
babel                     2.9.1              pyh44b312d_0    conda-forge    
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge    
backports                 1.0                        py_2    conda-forge    
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
beautifulsoup4            4.9.3              pyhb0f4dca_0    conda-forge    
bleach                    4.0.0              pyhd8ed1ab_0    conda-forge    
brotlipy                  0.7.0           py39hb82d6ee_1001    conda-forge  
bzip2                     1.0.8                h8ffe710_4    conda-forge    
ca-certificates           2021.5.30            h5b45459_0    conda-forge    
cached-property           1.5.2                hd8ed1ab_1    conda-forge    
cached_property           1.5.2              pyha770c72_1    conda-forge    
cachetools                4.2.2              pyhd8ed1ab_0    conda-forge    
cairo                     1.16.0            hb19e0ff_1008    conda-forge    
certifi                   2021.5.30        py39hcbf5309_0    conda-forge    
cffi                      1.14.6           py39h0878f49_0    conda-forge    
cfgv                      3.3.0              pyhd8ed1ab_0    conda-forge    
cftime                    1.5.0            py39h5d4886f_0    conda-forge    
chardet                   4.0.0            py39hcbf5309_1    conda-forge    
charset-normalizer        2.0.0              pyhd8ed1ab_0    conda-forge    
click                     8.0.1            py39hcbf5309_0    conda-forge    
click-completion          0.5.2            py39hcbf5309_2    conda-forge    
click-log                 0.3.2              pyh9f0ad1d_0    conda-forge    
cloudpickle               1.6.0                      py_0    conda-forge    
colorama                  0.4.4              pyh9f0ad1d_0    conda-forge    
commonmark                0.9.1                      py_0    conda-forge    
coverage                  5.5              py39hb82d6ee_0    conda-forge
cryptography              3.4.7            py39hd8d06c1_0    conda-forge
curl                      7.78.0               h789b8ee_0    conda-forge
cycler                    0.10.0                     py_2    conda-forge
debugpy                   1.4.1            py39h415ef7b_0    conda-forge
decorator                 5.0.9              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
distlib                   0.3.2              pyhd8ed1ab_0    conda-forge
docutils                  0.16             py39hcbf5309_3    conda-forge
editdistance-s            1.0.0            py39h2e07f2f_1    conda-forge
entrypoints               0.3             pyhd8ed1ab_1003    conda-forge
expat                     2.4.1                h39d44d4_0    conda-forge
fastprogress              1.0.0                      py_0    conda-forge
filelock                  3.0.12             pyh9f0ad1d_0    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 hab24e00_0    conda-forge
fontconfig                2.13.1            h1989441_1005    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
freetype                  2.10.4               h546665d_1    conda-forge
fribidi                   1.0.10               h8d14728_0    conda-forge
future                    0.18.2           py39hcbf5309_3    conda-forge
getopt-win32              0.1                  h8ffe710_0    conda-forge
gettext                   0.19.8.1          h1a89ca6_1005    conda-forge
gitdb                     4.0.7              pyhd8ed1ab_0    conda-forge
gitpython                 3.1.18             pyhd8ed1ab_0    conda-forge
graphite2                 1.3.13                     1000    conda-forge
graphviz                  2.48.0               hefbd956_0    conda-forge
greenlet                  1.1.1            py39h415ef7b_0    conda-forge
gts                       0.7.6                h7c369d9_2    conda-forge
h5py                      3.3.0           nompi_py39hf27771d_100    conda-forge
harfbuzz                  2.9.0                hc601d6f_0    conda-forge
hdf4                      4.2.15               h0e5069d_3    conda-forge
hdf5                      1.10.6          nompi_h5268f04_1114    conda-forge
icu                       68.1                 h0e60522_0    conda-forge
identify                  2.2.13             pyhd8ed1ab_0    conda-forge
idna                      3.1                pyhd3deb0d_0    conda-forge
imagesize                 1.2.0                      py_0    conda-forge
importlib-metadata        4.6.4            py39hcbf5309_0    conda-forge
iniconfig                 1.1.1              pyh9f0ad1d_0    conda-forge
intel-openmp              2021.3.0          h57928b3_3372    conda-forge
ipykernel                 6.2.0            py39h832f523_0    conda-forge
ipython                   7.26.0           py39h832f523_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
ipywidgets                7.6.3              pyhd3deb0d_0    conda-forge
jbig                      2.1               h8d14728_2003    conda-forge
jedi                      0.18.0           py39hcbf5309_2    conda-forge
jinja2                    3.0.1              pyhd8ed1ab_0    conda-forge
jpeg                      9d                   h8ffe710_0    conda-forge
jsonschema                3.2.0              pyhd8ed1ab_3    conda-forge
jupyter-cache             0.4.3              pyhd8ed1ab_0    conda-forge
jupyter-server-mathjax    0.2.3              pyhd8ed1ab_0    conda-forge
jupyter-sphinx            0.3.2                      py_0    conda-forge
jupyter_client            6.1.12             pyhd8ed1ab_0    conda-forge
jupyter_core              4.7.1            py39hcbf5309_0    conda-forge
jupyter_server            1.10.2             pyhd8ed1ab_0    conda-forge
jupyterlab_widgets        1.0.0              pyhd8ed1ab_1    conda-forge
kiwisolver                1.3.1            py39h2e07f2f_1    conda-forge
krb5                      1.19.2               hbae68bd_0    conda-forge
lcms2                     2.12                 h2a16943_0    conda-forge
lerc                      2.2.1                h0e60522_0    conda-forge
libblas                   3.9.0              11_win64_mkl    conda-forge
libcblas                  3.9.0              11_win64_mkl    conda-forge
libcurl                   7.78.0               h789b8ee_0    conda-forge
libdeflate                1.7                  h8ffe710_5    conda-forge
libffi                    3.3                  h0e60522_2    conda-forge
libgd                     2.3.2                h138e682_0    conda-forge
libglib                   2.68.3               h1e62bf3_0    conda-forge
libgpuarray               0.7.6             h8ffe710_1003    conda-forge
libiconv                  1.16                 he774522_0    conda-forge
liblapack                 3.9.0              11_win64_mkl    conda-forge
libnetcdf                 4.8.0           nompi_hf689e7d_103    conda-forge
libpng                    1.6.37               h1d00b33_2    conda-forge
libsodium                 1.0.18               h8d14728_1    conda-forge
libssh2                   1.9.0                h680486a_6    conda-forge
libtiff                   4.3.0                h0c97f57_1    conda-forge
libwebp                   1.2.1                h57928b3_0    conda-forge
libwebp-base              1.2.1                h8ffe710_0    conda-forge
libxcb                    1.13              hcd874cb_1003    conda-forge
libxml2                   2.9.12               hf5bbc77_0    conda-forge
libzip                    1.8.0                hfed4ece_0    conda-forge
livereload                2.6.3              pyh9f0ad1d_0    conda-forge
lz4-c                     1.9.3                h8ffe710_1    conda-forge
m2w64-binutils            2.25.1                        5    conda-forge
m2w64-bzip2               1.0.6                         6    conda-forge
m2w64-crt-git             5.0.0.4636.2595836               2    conda-forge
m2w64-gcc                 5.3.0                         6    conda-forge
m2w64-gcc-ada             5.3.0                         6    conda-forge
m2w64-gcc-fortran         5.3.0                         6    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6    conda-forge
m2w64-gcc-libs            5.3.0                         7    conda-forge
m2w64-gcc-libs-core       5.3.0                         7    conda-forge
m2w64-gcc-objc            5.3.0                         6    conda-forge
m2w64-gmp                 6.1.0                         2    conda-forge
m2w64-headers-git         5.0.0.4636.c0ad18a               2    conda-forge
m2w64-isl                 0.16.1                        2    conda-forge
m2w64-libiconv            1.14                          6    conda-forge
m2w64-libmangle-git       5.0.0.4509.2e5a9a2               2    conda-forge
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    conda-forge
m2w64-make                4.1.2351.a80a8b8               2    conda-forge
m2w64-mpc                 1.0.3                         3    conda-forge
m2w64-mpfr                3.1.4                         4    conda-forge
m2w64-pkg-config          0.29.1                        2    conda-forge
m2w64-toolchain           5.3.0                         7    conda-forge
m2w64-toolchain_win-64    2.4.0                         0    conda-forge
m2w64-tools-git           5.0.0.4592.90b8472               2    conda-forge
m2w64-windows-default-manifest 6.4                           3    conda-forge
m2w64-winpthreads-git     5.0.0.4634.697f757               2    conda-forge
m2w64-zlib                1.2.8                        10    conda-forge
mako                      1.1.4              pyh44b312d_0    conda-forge
markdown-it-py            0.6.2              pyhd8ed1ab_0    conda-forge
markupsafe                2.0.1            py39hb82d6ee_0    conda-forge
matplotlib-base           3.4.3            py39h581301d_0    conda-forge
matplotlib-inline         0.1.2              pyhd8ed1ab_2    conda-forge
mdit-py-plugins           0.2.6              pyhd8ed1ab_0    conda-forge
mistune                   0.8.4           py39hb82d6ee_1004    conda-forge
mkl                       2021.3.0           hb70f87d_564    conda-forge
mkl-service               2.4.0            py39hb82d6ee_0    conda-forge
more-itertools            8.8.0              pyhd8ed1ab_0    conda-forge
msys2-conda-epoch         20160418                      1    conda-forge
myst-nb                   0.12.3             pyhd8ed1ab_0    conda-forge
myst-parser               0.13.7             pyhd8ed1ab_0    conda-forge
nbclient                  0.5.4              pyhd8ed1ab_0    conda-forge
nbconvert                 5.6.0                      py_0    conda-forge
nbdime                    3.1.0              pyhd8ed1ab_0    conda-forge
nbformat                  5.1.3              pyhd8ed1ab_0    conda-forge
nbsphinx                  0.8.7              pyhd8ed1ab_0    conda-forge
nest-asyncio              1.5.1              pyhd8ed1ab_0    conda-forge
netcdf4                   1.5.7           nompi_py39hc20e565_100    conda-forge
nodeenv                   1.6.0              pyhd8ed1ab_0    conda-forge
notebook                  6.4.3              pyha770c72_0    conda-forge
numpy                     1.21.2           py39h6635163_0    conda-forge
numpydoc                  1.1.0                      py_1    conda-forge
olefile                   0.46               pyh9f0ad1d_1    conda-forge
openjpeg                  2.4.0                hb211442_1    conda-forge
openssl                   1.1.1k               h8ffe710_1    conda-forge
packaging                 21.0               pyhd8ed1ab_0    conda-forge
pandas                    1.3.2            py39h2e25243_0    conda-forge
pandoc                    2.14.1               h8ffe710_0    conda-forge
pandocfilters             1.4.2                      py_1    conda-forge
pango                     1.48.9               hd84fcdd_0    conda-forge
parso                     0.8.2              pyhd8ed1ab_0    conda-forge
patsy                     0.5.1                    pypi_0    pypi
pcre                      8.45                 h0e60522_0    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    8.3.1            py39h916092e_0    conda-forge
pip                       21.2.4             pyhd8ed1ab_0    conda-forge
pixman                    0.40.0               h8ffe710_0    conda-forge
pluggy                    0.13.1           py39hcbf5309_4    conda-forge
pre-commit                2.14.0           py39hcbf5309_0    conda-forge
prometheus_client         0.11.0             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.19             pyha770c72_0    conda-forge
pthread-stubs             0.4               hcd874cb_1001    conda-forge
py                        1.10.0             pyhd3deb0d_0    conda-forge
pycparser                 2.20               pyh9f0ad1d_2    conda-forge
pydata-sphinx-theme       0.6.3              pyhd8ed1ab_0    conda-forge
pygments                  2.10.0             pyhd8ed1ab_0    conda-forge
pygpu                     0.7.6           py39h5d4886f_1002    conda-forge
pymc3                     4.0                       dev_0    <develop>
pyopenssl                 20.0.1             pyhd8ed1ab_0    conda-forge
pyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge
pyreadline                2.1             py39hcbf5309_1003    conda-forge
pyrsistent                0.17.3           py39hb82d6ee_2    conda-forge
pysocks                   1.7.1            py39hcbf5309_3    conda-forge
pytest                    6.2.4            py39hcbf5309_0    conda-forge
pytest-cov                2.12.1             pyhd8ed1ab_0    conda-forge
python                    3.9.6           h7840368_1_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-graphviz           0.17               pyhaef67bd_0    conda-forge
python_abi                3.9                      2_cp39    conda-forge
pytz                      2021.1             pyhd8ed1ab_0    conda-forge
pywin32                   301              py39hb82d6ee_0    conda-forge
pywinpty                  1.1.3            py39h99910a6_0    conda-forge
pyyaml                    5.4.1            py39hb82d6ee_1    conda-forge
pyzmq                     22.2.1           py39he46f08e_0    conda-forge
recommonmark              0.7.1              pyhd8ed1ab_0    conda-forge
requests                  2.26.0             pyhd8ed1ab_0    conda-forge
requests-unixsocket       0.2.0                      py_0    conda-forge
scipy                     1.7.1            py39hc0c34ad_0    conda-forge
send2trash                1.8.0              pyhd8ed1ab_0    conda-forge
setuptools                57.4.0           py39hcbf5309_0    conda-forge
shellingham               1.4.0              pyh44b312d_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
smmap                     3.0.5              pyh44b312d_0    conda-forge
sniffio                   1.2.0            py39hcbf5309_1    conda-forge
snowballstemmer           2.1.0              pyhd8ed1ab_0    conda-forge
soupsieve                 2.0.1                      py_1    conda-forge
sphinx                    3.5.4              pyh44b312d_0    conda-forge
sphinx-autobuild          2021.3.14          pyhd8ed1ab_0    conda-forge
sphinx-panels             0.6.0              pyhd8ed1ab_0    conda-forge
sphinx-togglebutton       0.2.3              pyhd3deb0d_0    conda-forge
sphinxcontrib-applehelp   1.0.2                      py_0    conda-forge
sphinxcontrib-devhelp     1.0.2                      py_0    conda-forge
sphinxcontrib-htmlhelp    2.0.0              pyhd8ed1ab_0    conda-forge
sphinxcontrib-jsmath      1.0.1                      py_0    conda-forge
sphinxcontrib-qthelp      1.0.3                      py_0    conda-forge
sphinxcontrib-serializinghtml 1.1.5              pyhd8ed1ab_0    conda-forge
sqlalchemy                1.4.23           py39hb82d6ee_0    conda-forge
sqlite                    3.36.0               h8ffe710_0    conda-forge
tbb                       2021.3.0             h2d74725_0    conda-forge
terminado                 0.11.1           py39hcbf5309_0    conda-forge
testpath                  0.5.0              pyhd8ed1ab_0    conda-forge
tk                        8.6.10               h8ffe710_1    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
tornado                   6.1              py39hb82d6ee_1    conda-forge
traitlets                 5.0.5                      py_0    conda-forge
typing-extensions         3.10.0.0             hd8ed1ab_0    conda-forge
typing_extensions         3.10.0.0           pyha770c72_0    conda-forge
tzdata                    2021a                he74cb21_1    conda-forge
ucrt                      10.0.20348.0         h57928b3_0    conda-forge
urllib3                   1.26.6             pyhd8ed1ab_0    conda-forge
vc                        14.2                 hb210afc_5    conda-forge
virtualenv                20.4.7           py39hcbf5309_0    conda-forge
vs2015_runtime            14.29.30037          h902a5da_5    conda-forge
watermark                 2.2.0              pyhd8ed1ab_0    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
webencodings              0.5.1                      py_1    conda-forge
websocket-client          0.57.0           py39hcbf5309_4    conda-forge
wheel                     0.37.0             pyhd8ed1ab_1    conda-forge
widgetsnbextension        3.5.1            py39hcbf5309_4    conda-forge
win_inet_pton             1.1.0            py39hcbf5309_2    conda-forge
winpty                    0.4.3                         4    conda-forge
xarray                    0.19.0             pyhd8ed1ab_1    conda-forge
xorg-kbproto              1.0.7             hcd874cb_1002    conda-forge
xorg-libice               1.0.10               hcd874cb_0    conda-forge
xorg-libsm                1.2.3             hcd874cb_1000    conda-forge
xorg-libx11               1.7.2                hcd874cb_0    conda-forge
xorg-libxau               1.0.9                hcd874cb_0    conda-forge
xorg-libxdmcp             1.1.3                hcd874cb_0    conda-forge
xorg-libxext              1.3.4                hcd874cb_1    conda-forge
xorg-libxpm               3.5.13               hcd874cb_0    conda-forge
xorg-libxt                1.2.1                hcd874cb_2    conda-forge
xorg-xextproto            7.3.0             hcd874cb_1002    conda-forge
xorg-xproto               7.0.31            hcd874cb_1007    conda-forge
xz                        5.2.5                h62dcd97_1    conda-forge
yaml                      0.2.5                he774522_0    conda-forge
zeromq                    4.3.4                h0e60522_0    conda-forge
zipp                      3.5.0              pyhd8ed1ab_0    conda-forge
zlib                      1.2.11            h62dcd97_1010    conda-forge
zstd                      1.5.0                h6255e5f_0    conda-forge
1 Like

I believe this doc by @Sayam753 will help you: Generate Documentation · pymc-devs/pymc3 Wiki · GitHub

1 Like

I tried reproducing the error with same conda environment on Mac, but sadly could not. Can you make sure you are working on latest PyMC3’s main branch?

1 Like

Thanks for trying to reproduce.

Yes, I am working with the latest commit from the PyMC3 main branch.