Skip to content

aggdraw does not some to be able to find fonts when installed in a venv #74

@eteq

Description

@eteq

Minimal steps to reproduce (on Ubuntu 21.04, Python 3.9):

in terminal

% python -m venv aggdrawtest
% source  aggdrawtest/bin/activate
% pip install aggdraw
% python

in python:

>>> import aggdraw
>>> aggdraw.Font('black', '/usr/share/fonts/truetype/open-sans/OpenSans-Regular.ttf')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: cannot load font (no text renderer)

By contrast, if I do sudo apt install python3-aggdraw I see this in python:

>>> import aggdraw
>>> aggdraw.Font('black', '/usr/share/fonts/truetype/open-sans/OpenSans-Regular.ttf')
<Font object at 0x7f3847abcd10>

Clearly something is going wrong in the venv install. Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions