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

Issue installing cellphoneDB on macOS #50

Closed nadiacneto closed 1 year ago

nadiacneto commented 1 year ago

Hi team,

I am trying to install cellphone DB on my machine: macOS Monterey Python 3.9.13 pip 22.1.1

pip install -U cellphonedb cellphonedb database download

When I do this I get the following error: error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -I/opt/homebrew/opt/hdf5@1.8/include -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_ATLAS_INFO=3 -DHAVE_CBLAS -Ibuild/src.macosx-12-arm64-3.9/numpy/core/src/umath -Ibuild/src.macosx-12-arm64-3.9/numpy/core/src/npymath -Ibuild/src.macosx-12-arm64-3.9/numpy/core/src/common -Inumpy/core/include -Ibuild/src.macosx-12-arm64-3.9/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/opt/homebrew/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/include/python3.9 -Ibuild/src.macosx-12-arm64-3.9/numpy/core/src/common -Ibuild/src.macosx-12-arm64-3.9/numpy/core/src/npymath -c numpy/core/src/multiarray/array_assign_scalar.c -o build/temp.macosx-12-arm64-cpython-39/numpy/core/src/multiarray/array_assign_scalar.o -MMD -MF build/temp.macosx-12-arm64-cpython-39/numpy/core/src/multiarray/array_assign_scalar.o.d -faltivec -I/System/Library/Frameworks/vecLib.framework/Headers" failed with exit status 1

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for numpy Failed to build scikit-learn numpy ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects

I am able to locate numpy on my machine: pip3 show numpy Name: numpy Version: 1.23.1 Summary: NumPy is the fundamental package for array computing with Python. Home-page: https://www.numpy.org Author: Travis E. Oliphant et al. Author-email: License: BSD Location: /opt/homebrew/lib/python3.9/site-packages Requires: Required-by: scikit-learn, scipy

Please let me know if I am missing any other dependency or if there's anything else I should be doing beforehand. Thank you kindly for your help

prete commented 1 year ago

Hi @nadiacneto the command for installing (or updating) CellPhoneDB is: pip3 install -U cellphonedb

only after the install has completed you need to download the latest database with: cellphonedb database download

Can I check you are actually running both commands separately?

I'm going to guess that you're running this on an M1 Mac laptop, those devices have shown issues while installing older versions of some packages. In this case, the needed numpy version is 1.19.5 and may no be compatible with your architecture/compiler. However, if you've already got the requirements installed, then you may want to try installing CellPhoneDB without dependencies using:

pip3 install --no-dependencies cellphonedb

keep in mind that running cellphonedb will only work if you've got the dependencies installed on your own.

nadiacneto commented 1 year ago

Hi @prete

I was indeed running the single command to install cellphone db. pip3 install -U cellphonedb

Seems like you are correct and I am on a M1 Mac machine and when trying to install numpy v 1.19.5 I get the below error ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects

Has anyone with a similar machine as mine successfully managed to install cellphoneDB?

sinanugur commented 1 year ago

Hi @nadiacneto

I was able to install it into M1 Mac. Here is how:

conda create -n cellphone
conda activate cellphone
conda config --show (make sure your subdir is osx-64 not arm64, arm64 fails when installing,subdir: osx-64)
conda install python=3.7
conda install r-base -c r
pip install cellphonedb

Cheers,

and the list of packages in the environment, just in case:

# Name                    Version                   Build  Channel
_r-mutex                  1.0.1               anacondar_1    conda-forge
aniso8601                 9.0.1                    pypi_0    pypi
anndata                   0.7.8                    pypi_0    pypi
backports-zoneinfo        0.2.1                    pypi_0    pypi
boto3                     1.24.75                  pypi_0    pypi
botocore                  1.27.75                  pypi_0    pypi
bwidget                   1.9.14               h694c41f_1    conda-forge
bzip2                     1.0.8                h0d85af4_4    conda-forge
c-ares                    1.18.1               h0d85af4_0    conda-forge
ca-certificates           2022.9.14            h033912b_0    conda-forge
cairo                     1.16.0            h904041c_1014    conda-forge
cctools_osx-64            973.0.1             h3eff9a4_10    conda-forge
cellphonedb               3.1.0                    pypi_0    pypi
certifi                   2022.9.14                pypi_0    pypi
cffi                      1.15.1                   pypi_0    pypi
charset-normalizer        2.1.1                    pypi_0    pypi
clang                     14.0.4               h694c41f_0    conda-forge
clang-14                  14.0.4          default_h55ffa42_0    conda-forge
clang_osx-64              14.0.4               h3a95cd4_2    conda-forge
clangxx                   14.0.4          default_h55ffa42_0    conda-forge
clangxx_osx-64            14.0.4               he1dbc44_2    conda-forge
click                     7.1.2                    pypi_0    pypi
compiler-rt               14.0.4               h7fcd477_0    conda-forge
compiler-rt_osx-64        14.0.4               h6df654d_0    conda-forge
curl                      7.83.1               h23f1065_0    conda-forge
expat                     2.4.8                h96cf925_0    conda-forge
fbpca                     1.0                      pypi_0    pypi
flask                     1.1.4                    pypi_0    pypi
flask-restful             0.3.9                    pypi_0    pypi
flask-testing             0.8.1                    pypi_0    pypi
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 hab24e00_0    conda-forge
fontconfig                2.14.0               h5bb23bf_1    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
freetype                  2.12.1               h3f81eb7_0    conda-forge
fribidi                   1.0.10               hbcb3906_0    conda-forge
geosketch                 0.3                      pypi_0    pypi
gettext                   0.19.8.1          hd1a6beb_1008    conda-forge
gfortran_impl_osx-64      9.5.0               h2221f41_25    conda-forge
gfortran_osx-64           9.5.0                h18f7dce_0    conda-forge
gmp                       6.2.1                h2e338ed_0    conda-forge
graphite2                 1.3.13            h2e338ed_1001    conda-forge
gsl                       2.7                  h93259b0_0    conda-forge
h5py                      2.10.0                   pypi_0    pypi
harfbuzz                  5.2.0                h52d05a2_0    conda-forge
icu                       70.1                 h96cf925_0    conda-forge
idna                      3.4                      pypi_0    pypi
importlib-metadata        4.12.0                   pypi_0    pypi
isl                       0.22.1               hb1e8313_2    conda-forge
itsdangerous              1.1.0                    pypi_0    pypi
jinja2                    2.11.3                   pypi_0    pypi
jmespath                  1.0.1                    pypi_0    pypi
joblib                    1.2.0                    pypi_0    pypi
jpeg                      9e                   hac89ed1_2    conda-forge
krb5                      1.19.3               hb98e516_0    conda-forge
ld64_osx-64               609                 h1e06c2b_10    conda-forge
lerc                      4.0.0                hb486fe8_0    conda-forge
libblas                   3.9.0           16_osx64_openblas    conda-forge
libcblas                  3.9.0           16_osx64_openblas    conda-forge
libclang-cpp14            14.0.4          default_h55ffa42_0    conda-forge
libcurl                   7.83.1               h23f1065_0    conda-forge
libcxx                    14.0.6               hccf4f1f_0    conda-forge
libdeflate                1.14                 hb7f2c08_0    conda-forge
libedit                   3.1.20191231         h0678c8f_2    conda-forge
libev                     4.33                 haf1e3a3_1    conda-forge
libffi                    3.4.2                h0d85af4_5    conda-forge
libgfortran               5.0.0           10_4_0_h97931a8_25    conda-forge
libgfortran-devel_osx-64  9.5.0               hc2d6858_25    conda-forge
libgfortran5              11.3.0              h082f757_25    conda-forge
libglib                   2.72.1               hfbcb929_0    conda-forge
libiconv                  1.16                 haf1e3a3_0    conda-forge
liblapack                 3.9.0           16_osx64_openblas    conda-forge
libllvm13                 13.0.1               h64f94b2_2    conda-forge
libllvm14                 14.0.4               h41df66c_0    conda-forge
libnghttp2                1.47.0               h5aae05b_1    conda-forge
libopenblas               0.3.21          openmp_h429af6e_3    conda-forge
libpng                    1.6.38               ha978bb4_0    conda-forge
libsqlite                 3.39.3               ha978bb4_0    conda-forge
libssh2                   1.10.0               h47af595_3    conda-forge
libtiff                   4.4.0                hdb44e8a_4    conda-forge
libwebp-base              1.2.4                h775f41a_0    conda-forge
libxml2                   2.9.14               hea49891_4    conda-forge
libzlib                   1.2.12               hfd90126_3    conda-forge
llvm-openmp               14.0.4               ha654fa7_0    conda-forge
llvm-tools                14.0.4               h41df66c_0    conda-forge
llvmlite                  0.39.1                   pypi_0    pypi
make                      4.3                  h22f3db7_1    conda-forge
markupsafe                2.1.1                    pypi_0    pypi
mpc                       1.2.1                hbb51d92_0    conda-forge
mpfr                      4.1.0                h0f52abe_1    conda-forge
natsort                   8.2.0                    pypi_0    pypi
ncurses                   6.3                  h96cf925_1    conda-forge
numba                     0.56.2                   pypi_0    pypi
numpy                     1.19.5                   pypi_0    pypi
numpy-groupies            0.9.19                   pypi_0    pypi
openssl                   3.0.5                hfd90126_2    conda-forge
packaging                 21.3                     pypi_0    pypi
pandas                    1.1.4                    pypi_0    pypi
pango                     1.50.10              h1f197d0_0    conda-forge
pcre                      8.45                 he49afe7_0    conda-forge
pcre2                     10.37                h3f55489_1    conda-forge
pika                      1.3.0                    pypi_0    pypi
pip                       22.2.2             pyhd8ed1ab_0    conda-forge
pixman                    0.40.0               hbcb3906_0    conda-forge
pycparser                 2.21                     pypi_0    pypi
pyparsing                 3.0.9                    pypi_0    pypi
python                    3.7.12          hf3644f1_100_cpython    conda-forge
python-dateutil           2.8.2                    pypi_0    pypi
python_abi                3.7                     2_cp37m    conda-forge
pytz                      2022.2.1                 pypi_0    pypi
pytz-deprecation-shim     0.1.0.post0              pypi_0    pypi
pyyaml                    5.4.1                    pypi_0    pypi
r-base                    4.2.1                h85fa70c_1    conda-forge
readline                  8.1.2                h3899abd_0    conda-forge
requests                  2.28.1                   pypi_0    pypi
rpy2                      3.5.4                    pypi_0    pypi
s3transfer                0.6.0                    pypi_0    pypi
scikit-learn              0.22                     pypi_0    pypi
scipy                     1.7.3                    pypi_0    pypi
setuptools                59.8.0                   pypi_0    pypi
sigtool                   0.1.3                h88f4db0_0    conda-forge
six                       1.16.0                   pypi_0    pypi
sqlalchemy                1.3.24                   pypi_0    pypi
sqlite                    3.39.3               h9ae0607_0    conda-forge
tapi                      1100.0.11            h9ce4665_0    conda-forge
tk                        8.6.12               h5dbffcc_0    conda-forge
tktable                   2.10                 h49f0cf7_3    conda-forge
tqdm                      4.64.1                   pypi_0    pypi
typing-extensions         4.3.0                    pypi_0    pypi
tzdata                    2022.2                   pypi_0    pypi
tzlocal                   4.2                      pypi_0    pypi
urllib3                   1.26.12                  pypi_0    pypi
werkzeug                  1.0.1                    pypi_0    pypi
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
xlrd                      1.2.0                    pypi_0    pypi
xz                        5.2.6                h775f41a_0    conda-forge
zipp                      3.8.1                    pypi_0    pypi
zlib                      1.2.12               hfd90126_3    conda-forge
zstd                      1.5.2                hfa58983_4    conda-forge
prete commented 1 year ago

@nadiacneto hope @sinanugur answer worked for you, otherwise you can try with other solutions for M1/m2 devices discussed in #76