pycairo
pycairo copied to clipboard
Able to use pycairo 1.11.1 but not 1.20.0
My system is Manjaro Linux 20.2, my Python version is 3.8.5, and I was experiencing the same problem as described in https://github.com/pygobject/pycairo/issues/148 , i.e., when trying to import cairo
, I experience the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/tianyi/anaconda3/lib/python3.8/site-packages/cairo/__init__.py", line 1, in <module>
from ._cairo import * # noqa: F401,F403
ImportError: /home/tianyi/anaconda3/lib/python3.8/site-packages/cairo/_cairo.cpython-38-x86_64-linux-gnu.so: undefined symbol: cairo_svg_surface_set_document_unit
I tried pip3 install pycairo==1.11.1
and this solves the problem. Probably some changes in later versions made pycairo not back-compatible?
My system is Manjaro Linux 20.2, my Python version is 3.8.5, and I was experiencing the same problem as described in #148 , i.e., when trying to
import cairo
, I experience the following error:Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/tianyi/anaconda3/lib/python3.8/site-packages/cairo/__init__.py", line 1, in <module> from ._cairo import * # noqa: F401,F403 ImportError: /home/tianyi/anaconda3/lib/python3.8/site-packages/cairo/_cairo.cpython-38-x86_64-linux-gnu.so: undefined symbol: cairo_svg_surface_set_document_unit
I tried
pip3 install pycairo==1.11.1
and this solves the problem. Probably some changes in later versions made pycairo not back-compatible?
I had hard time using libcairo2-dev and pycairo in Ubuntu 18.04 LTS system. Tried all the options. But had "File "/usr/lib/python3/dist-packages/cairo/init.py", line 1, in
Also I will give credit to https://www.reddit.com/r/Python/comments/doq8ye/installing_pycairo_issue/ 2.https://github.com/3b1b/manim/pull/571/commits/36a7d9fb1825554a460c6fd55389e90cc128b4bf;
Change your requirements.txt with the correct version. It should work with even pycairo==1.17.1