Closed
Description
System:
- macOS 10.14.2
- XCode 10.1
- Python 3.7.2
What I did:
Attempted a new install of gftools master branch at 8ffa69c by cloning the repository and installing with:
pip install -e .
What happened:
Installing collected packages: Werkzeug, itsdangerous, Flask, absl-py, glyphsLib, tabulate, pycairo, uharfbuzz, freetype-py, fontdiffenator, nose, olefile, simplejson, pybrowserstack-screenshots, gfdiffbrowsers, gftools
Running setup.py install for pycairo ... error
Complete output from command /usr/local/opt/python/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/x7/vs8mbwmx1hg1vcb53nlygt0m0000gn/T/pip-install-yjt3s04w/pycairo/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/x7/vs8mbwmx1hg1vcb53nlygt0m0000gn/T/pip-record-dbpg93da/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.14-x86_64-3.7
creating build/lib.macosx-10.14-x86_64-3.7/cairo
copying cairo/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/cairo
copying cairo/__init__.pyi -> build/lib.macosx-10.14-x86_64-3.7/cairo
copying cairo/py.typed -> build/lib.macosx-10.14-x86_64-3.7/cairo
running build_ext
'pkg-config' not found.
Command ['pkg-config', '--print-errors', '--exists', 'cairo >= 1.13.1']
----------------------------------------
Command "/usr/local/opt/python/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/x7/vs8mbwmx1hg1vcb53nlygt0m0000gn/T/pip-install-yjt3s04w/pycairo/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/x7/vs8mbwmx1hg1vcb53nlygt0m0000gn/T/pip-record-dbpg93da/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/x7/vs8mbwmx1hg1vcb53nlygt0m0000gn/T/pip-install-yjt3s04w/pycairo/
How I Fixed It:
PyCairo requires a homebrew install of cairo
and pkg-config
. I've apparently previously installed cairo
, but not pkg-config
.
$ brew install pkg-config
$ pip install -e .
and gftools installed without problems. Happy to file a README update PR with these instructions if I am not missing something. I checked and pkg-config
does not appear to be installed with XCode CL tools. Seems to require a manual install before the pip install attempt here (and for fontdiffenator alone...).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels