LouisFaure/scFates

Importing scFates

sidrahmaryam-cyber opened this issue · 4 comments

Hello,
I installed the scFate using
pip install scFates

however, when I am trying to import it, following error pops up:

OSError: no library called "cairo-2" was found
no library called "cairo" was found
no library called "libcairo-2" was found
cannot load library 'libcairo.so.2': dlopen(libcairo.so.2, 2): image not found
cannot load library 'libcairo.2.dylib': dlopen(libcairo.2.dylib, 2): image not found
cannot load library 'libcairo-2.dll': dlopen(libcairo-2.dll, 2): image not found

I tried to look for the possible issue and its solution, however, I am not able to get the exact answer which could be useful. I will be grateful if I could use your help.

Thanks!

Hi, could you tell me the full traceback, such as which line of code is triggering the error?

It is likely coming from igraph-python, which is a dependency of scFates, as some plotting functions requires cairo library (see igraph/python-igraph#283).

If you have installed scFates on a conda environment, I would try to install cairo on that environment:

conda install -c anaconda cairo

Otherwise, you need to install cairo on your OS, the command will depend on which one you have.

I did some test without cairo installed and it turns out that in the requirements I had left the package cairocffi, which if installed when cairo is not present would lead to the issue you are encountering.

So you can ignore the previous solution and for now simply uninstall it:

pip uninstall cairocffi 

I will fix this requirement in the next release!

Hey Louis,
Thank you for your response.
The issue was arising when I ran 'import scFates'

However, uninstalling the cairocffi did the job, and it now works smooth.

Thanks a lot :)

Glad it worked! I have released the version 0.8.1 which removes cairocffi for now on