Teichlab / cellphonedb

MIT License
339 stars 105 forks source link

problems with installing on terminal when running setup.py install pandas #237

Closed rachel662 closed 3 years ago

rachel662 commented 3 years ago

Hi there,

I am following the instructions to install cellphone db on my terminal, however it runs into problems when running setup.py install for pandas. I get some errors and lots of warning messages.

this is the error I get ERROR: Command errored out with exit status 1: /Users/rachel/cpdb-venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/w9/rgff1n4j2hv2rdgkqzh38gb00000gn/T/pip-install-u2j1xn6h/pandas_77ca14e9a90b41439fd013482462c446/setup.py'"'"'; file='"'"'/private/var/folders/w9/rgff1n4j2hv2rdgkqzh38gb00000gn/T/pip-install-u2j1xn6h/pandas_77ca14e9a90b41439fd013482462c446/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/w9/rgff1n4j2hv2rdgkqzh38gb00000gn/T/pip-record-2ymbka83/install-record.txt --single-version-externally-managed --compile --install-headers /Users/rachelfinlay/cpdb-venv/include/site/python3.8/pandas Check the logs for full command output.

any advice you have for successfully installing cellphonedb would be amazing

thank you Rachel

prete commented 3 years ago

Hi @rachel662 , you're using python 3.8 (you can check your python version using python -V) and, for the time being, CellphoneDB only seems to work only with python version from 3.5.0 to 3.7.9.

Your options are:

rachel662 commented 3 years ago

Hi Pete, thanks so much for your help

pyenv seems the easiest way to do this, then i can create the virtual environment, however i don't seem to be able to use that method?

I get these errors after typing in pyenv install 3.7.3

python-build: use zlib from xcode sdk

BUILD FAILED (OS X 11.0.1 using python-build 20180424)

Inspect or clean up the working tree at /var/folders/w9/rgff1n4j2hv2rdgkqzh38gb00000gn/T/python-build.20201206123135.9014 Results logged to /var/folders/w9/rgff1n4j2hv2rdgkqzh38gb00000gn/T/python-build.20201206123135.9014.log

Last 10 log lines: clang -c -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -I. -I./Include -I/usr/local/opt/readline/include -I/usr/local/opt/readline/include -I/Users/rachel/.pyenv/versions/3.7.3/include -I/usr/local/opt/readline/include -I/usr/local/opt/readline/include -I/Users/rachel/.pyenv/versions/3.7.3/include -DPy_BUILD_CORE -o Modules/gcmodule.o Modules/gcmodule.c 1 warning generated. clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -I. -I./Include -I/usr/local/opt/readline/include -I/usr/local/opt/readline/include -I/Users/rachel/.pyenv/versions/3.7.3/include -I/usr/local/opt/readline/include -I/usr/local/opt/readline/include -I/Users/rachel/.pyenv/versions/3.7.3/include -DPy_BUILD_CORE_BUILTIN -DPy_BUILD_CORE -c ./Modules/posixmodule.c -o Modules/posixmodule.o ./Modules/posixmodule.c:8431:15: error: implicit declaration of function 'sendfile' is invalid in C99 [-Werror,-Wimplicit-function-declaration] ret = sendfile(in, out, offset, &sbytes, &sf, flags); ^ clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -I. -I./Include -I/usr/local/opt/readline/include -I/usr/local/opt/readline/include -I/Users/rachel/.pyenv/versions/3.7.3/include -I/usr/local/opt/readline/include -I/usr/local/opt/readline/include -I/Users/rachel/.pyenv/versions/3.7.3/include -DPy_BUILD_CORE_BUILTIN -c ./Modules/errnomodule.c -o Modules/errnomodule.o 1 error generated. make: [Modules/posixmodule.o] Error 1 make: Waiting for unfinished jobs....

prete commented 3 years ago

Hi, that seems more of an pyenv/homebrew/mac specific error. Please refer to their project, particularly this issue: https://github.com/pyenv/pyenv/issues/1643

If this causes more issues for you, I'd recommend you try miniconda3 or mamba for creating pyhton environments and handling dependencies.

rachel662 commented 3 years ago

Thanks so much for your help, the conda version worked. I will check out that issue in case I try using pyenv again.

also, this might be a silly question, but do you have to normalise the counts file from scRNA-seq before running cellphoneDB? and then just saved the normalised counts file as a txt file?

thanks so much Rachel

prete commented 3 years ago

Thanks so much for your help, the conda version worked. I will check out that issue in case I try using pyenv again.

Glad to hear that.

also, this might be a silly question, but do you have to normalise the counts file from scRNA-seq before running cellphoneDB? and then just saved the normalised counts file as a txt file?

I'm going to let someone else answer that for you on #241.