add cairo package in the anaconda python distribution

前端 未结 2 808
情书的邮戳
情书的邮戳 2021-01-22 02:07

I am new to using the anaconda distribution for python, and I have trouble installing the cairo package. Note that I am using Mac OsX.

I ran the following command

2条回答
  •  有刺的猬
    2021-01-22 02:26

    Have you installed a package with Python bindings, such as PyCairo och cairocffi? If you haven't you won't be able to interact with Cairo from Python.

    I've just spent way too much time trying to get this to work myself with Anaconda on my Mac. I couldn't get PyCairo to work at all, but I managed to get cairocffi installed and working through pip after a bit of fiddling.

    If import cairocffi doesn't work and gives you an error message that ends with

    OSError: cannot load library libcairo.so.2: dlopen(libcairo.so.2, 2): image not found

    try export DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH:/Users/your_username/anaconda/lib/ or whatever your Anaconda path is at the command line.

    Also see https://github.com/SimonSapin/cairocffi/issues/29

提交回复
热议问题