LouisFaure / scFates

a scalable python suite for tree inference and advanced pseudotime analysis from scRNAseq data.
https://scfates.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
49 stars 1 forks source link

Importing scFates #6

Closed sidrahmaryam-cyber closed 2 years ago

sidrahmaryam-cyber commented 2 years ago

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!

LouisFaure commented 2 years ago

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 https://github.com/igraph/python-igraph/issues/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.

LouisFaure commented 2 years ago

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!

sidrahmaryam-cyber commented 2 years ago

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 :)

LouisFaure commented 2 years ago

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