Tech | Install igraph on Apple Silicon (with cario not found fixed)
date
Feb 4, 2023
slug
install-igraph-cario-python-apple-silicon-fix-not-found
status
Published
summary
To resolve the "no library called 'cairo-2' was found" error on Apple Silicon when using igraph, install Cairo with
brew install cairo
and then install pycairo using pip3 install --force-reinstall --no-cache-dir pycairo
.tags
Engineering
type
Post
Problem
When I was trying to evaluate igraph, the issue arose suggesting:
`no library called "cairo-2" was found`
Since it was urgent for me to try the speed of this module out, so I managed to fix the problem.
Solution
- Install the library:
brew install cairo
- Let Python find the library: install pycairo after brew-installed cairo using:
pip3 install --force-reinstall --no-cache-dir pycairo
Explanation
Generally caused by misconfigured path but for Apple Silicon Devices, this issue is introduced by this differentiated architecture, arm64, with moved lib folder.