ventolab / CellphoneDB

CellPhoneDB can be used to search for a particular ligand/receptor, or interrogate your own HUMAN single-cell transcriptomics data.
https://www.cellphonedb.org/
MIT License
308 stars 51 forks source link

Unable to download CellPhoneDB #57

Closed clb94 closed 7 months ago

clb94 commented 1 year ago

Hello,

I'm having trouble starting the pipeline to process my scRNAseq data with CellPhone DB. I am working in the Jupyter Notebook with Python version 3.9, on an M1 Macbook Pro. Firstly, I am unable to create an environment using conda; I type conda create -n cpdb python=3.9, and am then asked to confirm installation of required packages. When I type and enter [y], the code is stuck and runs indefinitely. This I understand isn't a problem with CellPhone DB but gives some context.

I therefore tried to directly install the CellPhoneDB package with: pip install -U cellphonedb. A lot of code is printed but it contains some errors, notably that the scikit_learn kit couldn't be built. I have tried installing cellphone db without dependencies (as suggested on this thread https://github.com/ventolab/CellphoneDB/issues/50), but I am unable to install the required version of scikit_learn listed following this advice (0.22) (https://github.com/ventolab/CellphoneDB/blob/master/requirements.txt).

I assume that the package hasn't properly installed, because when I follow the next instruction and type: cellphonedb database download, a SyntaxError is returned.

If anyone could offer any advice so that I may move forward, I would be really grateful. I am also happy to provide more information if that is relevant - this language is new to me so apologies if I have missed something vital. Thank you!

prete commented 1 year ago

Hi @clb94, thank you for using CellPhoneDB.

We've seen lots of M1/M2 MacBooks issues lately in general with Python installs for all packages, not just CPDB.

Can I check:

Finally, for CellPhoneDB we recomend python 3.8 rather than 3.9.

Hope any of those things help oyu move forward.

clb94 commented 1 year ago

Hi @clb94, thank you for using CellPhoneDB.

We've seen lots of M1/M2 MacBooks issues lately in general with Python installs for all packages, not just CPDB.

Can I check:

  • is rosetta2 is enabled on your terminal by doing uname -m (do you get x86_64 or arm64?)
  • which conda installer you used? I guess you used this one, but if you're using the intel version you need to have Rosetta2 installed

Finally, for CellPhoneDB we recomend python 3.8 rather than 3.9.

Hope any of those things help oyu move forward.

Thanks so much for getting back to me. To answer your questions, I get arm64 when I look in terminal. Just in case, I installed rosetta2 which was successful.

I used the miniconda3 package, for the apple M1 arm. This also does state that this is running the recommended python 3.8 rather than 3.9, and I have deleted anaconda navigator to remove any confusion.

I then installed jupyter in the terminal, and launched the jupyter notebook from there. Following the instructions on this page, I tried to generate a virtual environment by both conda and python methods (don't know if this is necessary in jupyter) but each of these failed - either because it says I am not using conda, or a syntax error. I then went straight to the installation step of CellPhoneDB, which seemed to work. However, once again when I type cellphonedb database download, it returns a syntax error and I am unable to continue.

Thank you so much for your assistance. Please let me know if you can think what the problem might be.

dacheampong commented 1 year ago

Any update on this as I am also having similar issues installing it on M1 macbook pro, python 3.8, I do have rosetta 2 enabled with anaconda installer but still unable to get cellphonedb installed in my environment.

L-wang17 commented 9 months ago

Any update on this? I have M1 chip with arm64 and similar issue installing the CellphoneDB through conda. I had error "fail for building scikit-learn" and I tried the way that scikit-learn recommend for M1 separately and then install CellphoneDB I got same error. Is there a way to solve that?

datasome commented 9 months ago

Hi L-wang17,

I work on a 64bit M1 chip mac so hopefully we will be able to sort this together. Assuming that

  1. You already have a terminal open in x86_64 architecture (see https://apple.stackexchange.com/questions/428768/on-apple-m1-with-rosetta-how-to-open-entire-terminal-iterm-in-x86-64-architec),

  2. Could you please follow instructions on https://towardsdatascience.com/how-to-install-miniconda-x86-64-apple-m1-side-by-side-on-mac-book-m1-a476936bfaf0 to download and install miniconda, and then do:

  3. conda create -n cpdb python=3.8

  4. source activate cpdb

  5. pip install -U CellphoneDB==3.1.0 (I'm assuming you're after using the old version of CellphoneDB, but if you're happy to use the latest version, please try: pip install -U cellphonedb)

.. and let me know how you got on? The above has worked for me (at least for the latest version of CellphoneDB: 4.0.0)

Best,

Robert.