Skip to content

On Windows, matplotlib fails to load fonts when installed to a folder with non-ascii path #3148

@anntzer

Description

@anntzer

After installing matplotlib (on Windows, via miniconda) to a non-ascii path, running

python -c "from matplotlib import pyplot as plt; plt.xlabel('$x$'); plt.show()"

fails with a long traceback that ends with

File "C:/non/ascii/path/to/matplotlib/mathtext.py", line 584, in _get_font
    font = FT2Font(str(basename))
RuntimeError: Could not open facefile C:/non/ascii/path/to/matplotlib/mpl-data/fonts/ttf/Vera.ttf; Cannot_Open_Resource

Note that this is specific to Windows (I wasn't able to reproduce the issue by creating a virtualenv on Linux) and to non-ascii paths (changing the path solved the issue).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      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