CARVIEW |
Select Language
HTTP/2 200
date: Wed, 15 Oct 2025 07:48:54 GMT
server: Fly/5d9a8537e (2025-10-13)
content-type: text/html; charset=utf-8
content-encoding: gzip
via: 2 fly.io, 2 fly.io
fly-request-id: 01K7KDFV8KDGWY32EXQED5FR4K-bom
Build the official Python documentation locally | Simon Willison’s TILs
Build the official Python documentation locally
First, checkout the cpython repo:
$ git clone git@github.com:python/cpython
cd into the Doc
directory:
$ cd cpython/Doc
To get a virtual environment with Sphinx and other required tools, run make venv
like this:
$ make venv
python3 -m venv ./venv
./venv/bin/python3 -m pip install -U pip setuptools
...
Installing collected packages: snowballstemmer, sphinxcontrib-jsmath, sphinxcontrib-devhelp, sphinxcontrib-serializinghtml, pyparsing, six, packaging, sphinxcontrib-applehelp, sphinxcontrib-qthelp, alabaster, docutils, MarkupSafe, Jinja2, pytz, babel, imagesize, chardet, certifi, urllib3, idna, requests, Pygments, sphinxcontrib-htmlhelp, Sphinx, blurb, python-docs-theme
Running setup.py install for python-docs-theme ... done
Successfully installed Jinja2-2.11.2 MarkupSafe-1.1.1 Pygments-2.6.1 Sphinx-2.2.0 alabaster-0.7.12 babel-2.8.0 blurb-1.0.7 certifi-2020.4.5.1 chardet-3.0.4 docutils-0.16 idna-2.9 imagesize-1.2.0 packaging-20.3 pyparsing-2.4.7 python-docs-theme-2020.1 pytz-2020.1 requests-2.23.0 six-1.14.0 snowballstemmer-2.0.0 sphinxcontrib-applehelp-1.0.2 sphinxcontrib-devhelp-1.0.2 sphinxcontrib-htmlhelp-1.0.3 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-1.0.3 sphinxcontrib-serializinghtml-1.1.4 urllib3-1.25.9
The venv has been created in the ./venv directory
Now running make html
will build the docs:
$ make html
Run open build/html/index.html
to view them in a browser.
Related
- sphinx Adding Sphinx autodoc to a project, and configuring Read The Docs to build it - 2021-08-10
- sqlite Building a specific version of SQLite with pysqlite on macOS/Linux - 2021-08-14
- python Freezing requirements with pip-tools - 2022-07-14
- python Quickly testing code in a different Python version using pyenv - 2023-07-10
- sphinx Format code examples in documentation with blacken-docs - 2022-04-24
- markdown Useful Markdown extensions in Python - 2021-04-03
- python Check spelling using codespell - 2021-08-03
- python Defining setup.py dependencies using a URL - 2022-08-13
- github Running a Django and PostgreSQL development environment in GitHub Codespaces - 2023-08-10
- python Installing lxml for Python on an M1/M2 Mac - 2023-01-27
Created 2020-05-08T09:16:57-07:00, updated 2022-07-31T19:10:54-07:00 · History · Edit