googlefonts / googlefonts/fontmake

fontmake installation error with python 3.10

Open
#940 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
888
Forks
97
Avg merge
4d 52m
Merged PRs (30d)
1

Description

After upgrading to python 3.10, I made a new virtualenv and then tried installing fontmake using `pip install fontmake`

I get the following error:
```

In file included from src/lxml/etree.c:810:
src/lxml/includes/etree_defs.h:14:10: fatal error: 'libxml/xmlversion.h' file not found
#include "libxml/xmlversion.h"
^~~~~~~~~~~~~~~~~~~~~
1 error generated.
Compile failed: command '/usr/bin/clang' failed with exit code 1
cc -I/usr/include/libxml2 -c /var/folders/6b/yq0dskg15kqdkn3_k2457hk00000gn/T/xmlXPathInitn415fkns.c -o var/folders/6b/yq0dskg15kqdkn3_k2457hk00000gn/T/xmlXPathInitn415fkns.o
/var/folders/6b/yq0dskg15kqdkn3_k2457hk00000gn/T/xmlXPathInitn415fkns.c:1:10: fatal error: 'libxml/xpath.h' file not found
#include "libxml/xpath.h"
^~~~~~~~~~~~~~~~
1 error generated.
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
Perhaps try: xcode-select --install
*********************************************************************************
error: command '/usr/bin/clang' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> lxml

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
```

Then I tried making another virtualenv specifying the older python version 3.9, and then when I run `pip install fontmake` I don't get any tracebacks. I found this while helping someone install fontmake on a new computer and they had the issue too with the newer python version.

Are there different installation instructions for python 3.10 or newer? Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.