From 82a25257edddb05360625d5303de9f91674499b1 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Thu, 13 Mar 2025 23:51:11 +0100 Subject: [PATCH 1/3] DOC: Add install instructions for pixi and uv Closes #29746. Notes on issues with uv an tk taken from https://github.com/astral-sh/uv/issues/6893#issuecomment-2565965851 --- doc/index.rst | 27 +++++++++++++++++++++++++++ doc/install/index.rst | 3 ++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/doc/index.rst b/doc/index.rst index dedd614985df..7ff18c847155 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -29,6 +29,33 @@ Install conda install -c conda-forge matplotlib + .. tab-item:: pixi + + .. code-block:: bash + + pixi add matplotlib + + .. tab-item:: uv + + .. code-block:: bash + + uv add matplotlib + + .. warning:: + + The ``tkagg`` backend is not available because Python versions + distributed by uv do not contain tk bindings that are usable by + Matplotlib (see `this issue`_ for details). If you want Matplotlib + to be able to display plots in a window, you should install one of + the other :ref:`supported GUI frameworks `, + e.g. + + .. code-block:: bash + + uv add matplotlib pyside6 + + .. _this issue: https://github.com/astral-sh/uv/issues/6893#issuecomment-2565965851 + .. tab-item:: other .. rst-class:: section-toc diff --git a/doc/install/index.rst b/doc/install/index.rst index 8f9c91427f70..a13bb82744d6 100644 --- a/doc/install/index.rst +++ b/doc/install/index.rst @@ -28,7 +28,8 @@ precompiled wheel for your OS and Python. The following backends work out of the box: Agg, ps, pdf, svg Python is typically shipped with tk bindings which are used by - TkAgg. + TkAgg. Notably, python-build-standalone -- used by ``uv`` -- does + not include tk bindings that are usable by Matplotlib. For support of other GUI frameworks, LaTeX rendering, saving animations and a larger selection of file formats, you can From 672bb3f35e9bd40a40920a8296bf4f66ec5e28b4 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Mon, 17 Mar 2025 07:18:46 +0100 Subject: [PATCH 2/3] Update index.rst Co-authored-by: Thomas A Caswell --- doc/index.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/index.rst b/doc/index.rst index 7ff18c847155..74a183d6cd7b 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -43,9 +43,10 @@ Install .. warning:: - The ``tkagg`` backend is not available because Python versions - distributed by uv do not contain tk bindings that are usable by - Matplotlib (see `this issue`_ for details). If you want Matplotlib + If you install Python with ``uv`` then the ``tkagg`` backend + will not be available because python-build-standalone (used by uv + to distribute Python) does not contain tk bindings that are usable by + Matplotlib (see `this issue`_ for details). If you want Matplotlib to be able to display plots in a window, you should install one of the other :ref:`supported GUI frameworks `, e.g. From 49af2ffc32745fb80308f8f3c3a3eda260713c15 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Tue, 18 Mar 2025 21:50:39 +0100 Subject: [PATCH 3/3] Update doc/install/index.rst Co-authored-by: Thomas A Caswell --- doc/install/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/install/index.rst b/doc/install/index.rst index a13bb82744d6..3e6452eb2f41 100644 --- a/doc/install/index.rst +++ b/doc/install/index.rst @@ -28,7 +28,7 @@ precompiled wheel for your OS and Python. The following backends work out of the box: Agg, ps, pdf, svg Python is typically shipped with tk bindings which are used by - TkAgg. Notably, python-build-standalone -- used by ``uv`` -- does + TkAgg. Notably, python-build-standalone – used by ``uv`` – does not include tk bindings that are usable by Matplotlib. For support of other GUI frameworks, LaTeX rendering, saving pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy