[Python] import fontforge in a python script on macOS

Discussão em 'Python' iniciado por Stack, Fevereiro 15, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to access FontForge from a Python script (inside a virtual env) on macOS.

    After installing python and fontforge I get an error when trying to import fontforge.

    ImportError: No module named fontforge


    I have no problem running my script on Linux Mint, I just need to install the fontforge bindings apt install python3-fontforge.

    On archlinux there is no python bindings so I just edit the env/pyenv.cfg file and set include-system-site-packages = true to access fontforge from the venv.

    I don't find any python bindings on macOS and editing include-system-site-packages = true didn't solve the problem.

    How to import fontforge in a Python script (inside a virtual env) on macOS?

    Continue reading...

Compartilhe esta Página