cellphonedb
cellphonedb copied to clipboard
Windows Installation Error
Hi! I am having a similar error to #168 that is still open:
Microsoft Windows [Version 10.0.19041.685]
(c) 2020 Microsoft Corporation. All rights reserved.
C:\Users\HP>pip install cellphonedb
Collecting cellphonedb
Using cached CellPhoneDB-2.1.4.tar.gz (13.1 MB)
Requirement already satisfied: click<6.7.99,>=6.7 in c:\users\hp\appdata\local\programs\python\python39\lib\site-packages (from cellphonedb) (6.7)
Collecting pandas<0.23.99,>=0.23
Using cached pandas-0.23.4.tar.gz (10.5 MB)
Collecting flask<1.0.99,>=1.0
Using cached Flask-1.0.4-py2.py3-none-any.whl (92 kB)
Collecting Flask-RESTful<0.3.99,>=0.3
Using cached Flask_RESTful-0.3.8-py2.py3-none-any.whl (25 kB)
Collecting Flask-Testing<0.7.99,>=0.7
Using cached Flask-Testing-0.7.1.tar.gz (43 kB)
Collecting SQLAlchemy<1.3.99,>=1.3
Using cached SQLAlchemy-1.3.20-cp39-cp39-win_amd64.whl (1.2 MB)
Collecting PyYAML<5.1.99,>=5.1
Using cached PyYAML-5.1.2.tar.gz (265 kB)
Collecting requests<2.19.99,>=2.19
Using cached requests-2.19.1-py2.py3-none-any.whl (91 kB)
Collecting pika<0.12.99,>=0.12
Using cached pika-0.12.0-py2.py3-none-any.whl (108 kB)
Collecting boto3<1.7.99,>=1.7
Using cached boto3-1.7.84-py2.py3-none-any.whl (128 kB)
Collecting geosketch==0.3
Using cached geosketch-0.3.tar.gz (7.2 kB)
Collecting rpy2<3.0.99,>=3.0.4
Using cached rpy2-3.0.5.tar.gz (117 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\users\hp\appdata\local\programs\python\python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\HP\\AppData\\Local\\Temp\\pip-install-o5jnnqhk\\rpy2\\setup.py'"'"'; __file__='"'"'C:\\Users\\HP\\AppData\\Local\\Temp\\pip-install-o5jnnqhk\\rpy2\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\HP\AppData\Local\Temp\pip-pip-egg-info-zwd1mtpz'
cwd: C:\Users\HP\AppData\Local\Temp\pip-install-o5jnnqhk\rpy2\
Complete output (93 lines):
WARNING: The wheel package is not available.
WARNING: The wheel package is not available.
c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\cffi-1.14.4-py3.9-win-amd64.egg\cffi\cparser.py:163: UserWarning: Global variable 'R_NaN' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
warnings.warn("Global variable '%s' in cdef(): for consistency "
c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\cffi-1.14.4-py3.9-win-amd64.egg\cffi\cparser.py:163: UserWarning: Global variable 'R_NaReal' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
warnings.warn("Global variable '%s' in cdef(): for consistency "
c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\cffi-1.14.4-py3.9-win-amd64.egg\cffi\cparser.py:163: UserWarning: Global variable 'R_NaInt' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
warnings.warn("Global variable '%s' in cdef(): for consistency "
c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\cffi-1.14.4-py3.9-win-amd64.egg\cffi\cparser.py:163: UserWarning: Global variable 'R_NaString' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
warnings.warn("Global variable '%s' in cdef(): for consistency "
c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\cffi-1.14.4-py3.9-win-amd64.egg\cffi\cparser.py:163: UserWarning: Global variable 'R_BlankString' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
warnings.warn("Global variable '%s' in cdef(): for consistency "
c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\cffi-1.14.4-py3.9-win-amd64.egg\cffi\cparser.py:163: UserWarning: Global variable 'R_BlankScalarString' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
warnings.warn("Global variable '%s' in cdef(): for consistency "
c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\cffi-1.14.4-py3.9-win-amd64.egg\cffi\cparser.py:163: UserWarning: Global variable 'R_GlobalEnv' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
warnings.warn("Global variable '%s' in cdef(): for consistency "
c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\cffi-1.14.4-py3.9-win-amd64.egg\cffi\cparser.py:163: UserWarning: Global variable 'R_EmptyEnv' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
warnings.warn("Global variable '%s' in cdef(): for consistency "
c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\cffi-1.14.4-py3.9-win-amd64.egg\cffi\cparser.py:163: UserWarning: Global variable 'R_BaseEnv' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
warnings.warn("Global variable '%s' in cdef(): for consistency "
c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\cffi-1.14.4-py3.9-win-amd64.egg\cffi\cparser.py:163: UserWarning: Global variable 'R_BaseNamespace' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
warnings.warn("Global variable '%s' in cdef(): for consistency "
c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\cffi-1.14.4-py3.9-win-amd64.egg\cffi\cparser.py:163: UserWarning: Global variable 'R_BaseNamespaceRegistry' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
warnings.warn("Global variable '%s' in cdef(): for consistency "
c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\cffi-1.14.4-py3.9-win-amd64.egg\cffi\cparser.py:163: UserWarning: Global variable 'R_NilValue' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
warnings.warn("Global variable '%s' in cdef(): for consistency "
c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\cffi-1.14.4-py3.9-win-amd64.egg\cffi\cparser.py:163: UserWarning: Global variable 'R_UnboundValue' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
warnings.warn("Global variable '%s' in cdef(): for consistency "
c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\cffi-1.14.4-py3.9-win-amd64.egg\cffi\cparser.py:163: UserWarning: Global variable 'R_MissingArg' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
warnings.warn("Global variable '%s' in cdef(): for consistency "
c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\cffi-1.14.4-py3.9-win-amd64.egg\cffi\cparser.py:163: UserWarning: Global variable 'R_ClassSymbol' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
warnings.warn("Global variable '%s' in cdef(): for consistency "
c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\cffi-1.14.4-py3.9-win-amd64.egg\cffi\cparser.py:163: UserWarning: Global variable 'R_NameSymbol' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
warnings.warn("Global variable '%s' in cdef(): for consistency "
c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\cffi-1.14.4-py3.9-win-amd64.egg\cffi\cparser.py:163: UserWarning: Global variable 'R_DimSymbol' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
warnings.warn("Global variable '%s' in cdef(): for consistency "
Traceback (most recent call last):
File "c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\cffi-1.14.4-py3.9-win-amd64.egg\cffi\cparser.py", line 336, in _parse
ast = _get_parser().parse(fullcsource)
File "c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\pycparser-2.20-py3.9.egg\pycparser\c_parser.py", line 149, in parse
return self.cparser.parse(
File "c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\pycparser-2.20-py3.9.egg\pycparser\ply\yacc.py", line 331, in parse
return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
File "c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\pycparser-2.20-py3.9.egg\pycparser\ply\yacc.py", line 1199, in parseopt_notrack
tok = call_errorfunc(self.errorfunc, errtoken, self)
File "c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\pycparser-2.20-py3.9.egg\pycparser\ply\yacc.py", line 193, in call_errorfunc
r = errorfunc(token)
File "c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\pycparser-2.20-py3.9.egg\pycparser\c_parser.py", line 1858, in p_error
self._parse_error(
File "c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\pycparser-2.20-py3.9.egg\pycparser\plyparser.py", line 67, in _parse_error
raise ParseError("%s: %s" % (coord, msg))
pycparser.plyparser.ParseError: <cdef source string>:23:5: before: blah1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\HP\AppData\Local\Temp\pip-install-o5jnnqhk\rpy2\setup.py", line 151, in <module>
setup(
File "c:\users\hp\appdata\local\programs\python\python39\lib\site-packages\setuptools\__init__.py", line 165, in setup
return distutils.core.setup(**attrs)
File "c:\users\hp\appdata\local\programs\python\python39\lib\distutils\core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "c:\users\hp\appdata\local\programs\python\python39\lib\site-packages\setuptools\dist.py", line 429, in __init__
_Distribution.__init__(self, {
File "c:\users\hp\appdata\local\programs\python\python39\lib\distutils\dist.py", line 292, in __init__
self.finalize_options()
File "c:\users\hp\appdata\local\programs\python\python39\lib\site-packages\setuptools\dist.py", line 721, in finalize_options
ep(self)
File "c:\users\hp\appdata\local\programs\python\python39\lib\site-packages\setuptools\dist.py", line 728, in _finalize_setup_keywords
ep.load()(self, ep.name, value)
File "c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\cffi-1.14.4-py3.9-win-amd64.egg\cffi\setuptools_ext.py", line 219, in cffi_modules
add_cffi_module(dist, cffi_module)
File "c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\cffi-1.14.4-py3.9-win-amd64.egg\cffi\setuptools_ext.py", line 49, in add_cffi_module
execfile(build_file_name, mod_vars)
File "c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\cffi-1.14.4-py3.9-win-amd64.egg\cffi\setuptools_ext.py", line 25, in execfile
exec(code, glob, glob)
File "rpy/_rinterface_cffi_build.py", line 498, in <module>
ffibuilder.cdef("""
File "c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\cffi-1.14.4-py3.9-win-amd64.egg\cffi\api.py", line 112, in cdef
self._cdef(csource, override=override, packed=packed, pack=pack)
File "c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\cffi-1.14.4-py3.9-win-amd64.egg\cffi\api.py", line 126, in _cdef
self._parser.parse(csource, override=override, **options)
File "c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\cffi-1.14.4-py3.9-win-amd64.egg\cffi\cparser.py", line 389, in parse
self._internal_parse(csource)
File "c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\cffi-1.14.4-py3.9-win-amd64.egg\cffi\cparser.py", line 394, in _internal_parse
ast, macros, csource = self._parse(csource)
File "c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\cffi-1.14.4-py3.9-win-amd64.egg\cffi\cparser.py", line 338, in _parse
self.convert_pycparser_error(e, csource)
File "c:\users\hp\appdata\local\temp\pip-install-o5jnnqhk\rpy2\.eggs\cffi-1.14.4-py3.9-win-amd64.egg\cffi\cparser.py", line 367, in convert_pycparser_error
raise CDefError(msg)
cffi.CDefError: cannot parse "blah1 ReadConsole;"
<cdef source string>:23:5: before: blah1
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I would greatly appreciate some guidance on installing this package!
Thanks!
Hi!
I'm having the exact same issue trying to install in a new conda environment.
Solved it by first using conda to install all dependencies. Check out the file below and remove the .txt extension. I had to add it to upload on github. environment.yml
Then
conda env create -f environment.yml
Go to env
conda activate cellphone
Then
pip install --no-dependencies cellphonedb
Hope that helps. Note however that this can introduce compability issues, but it seems to work and I can run analysis on my data.
EDIT: Above solution did not work with plotting. Ended up running this environment: environment.yml
in a wsl environment.
@JonETJakobsson really helps! thx a lot
hi there, I'm having exactly the same problem, would you be able to tell me how to install all the dependencies needed?
kind regards, Rachel
hi there, I'm having exactly the same problem, would you be able to tell me how to install all the dependencies needed?
kind regards, Rachel
Hi Rachel,
Follow the instructions from Jon and it should download the dependencies for you (they're specified in the environment.yml file). After downloading the file to my working directory and running the commands he listed I was able to get it up and running.
Best, Andrew
EDIT: I was able to create the environment and run cellphonedb, however I need to specify --counts-data=gene_name as my Seurat object is formatted that way. For some reason this option is not recognized ("Error: no such option: --counts-data") Duplicate of #258
Hi!
I'm having the exact same issue trying to install in a new conda environment.
Solved it by first using conda to install all dependencies. Check out the file below and remove the .txt extension. I had to add it to upload on github. environment.yml
Then
conda env create -f environment.yml
Go to env
conda activate cellphone
Then
pip install --no-dependencies cellphonedb
Hope that helps. Note however that this can introduce compability issues, but it seems to work and I can run analysis on my data.
EDIT: Above solution did not work with plotting. Ended up running this environment: environment.yml
in a wsl environment.
when I run the code conda env create -f environment.yml I got an error : ResolvePackageNotFound:
- requests,
after I install it using pip, it does not work! could you help?