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
Generally caused by misconfigured path but for Apple Silicon Devices, this issue is introduced by this differentiated architecture, arm64, with moved lib folder.
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

  1. Install the library: brew install cairo
  1. Let Python find the library: install pycairo after brew-installed cairo using:
    1. 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.

Reference

 

© Rongxin 2021 - 2024