Teichlab / cellphonedb

MIT License
340 stars 105 forks source link

error during installation: cffi.CDefError: cannot parse "blah1 ReadConsole #168

Open rahulnutron opened 4 years ago

rahulnutron commented 4 years ago

Dear Cellphonedb team,

Thanks for this nice package! I was trying to install the package, however getting an error. I have installed rpy2, still the error persists. I also tried to install through conda, but that also didn't help. I appreciate for any help.

Regards, Rahul

ERROR: Command errored out with exit status 1:
 command: 'C:\Users\rahul\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\rahul\\AppData\\Local\\Temp\\pip-install-i2jc_2zl\\rpy2\\setup.py'"'"'; __file__='"'"'C:\\Users\\rahul\\AppData\\Local\\Temp\\pip-install-i2jc_2zl\\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\rahul\AppData\Local\Temp\pip-install-i2jc_2zl\rpy2\pip-egg-info'
     cwd: C:\Users\rahul\AppData\Local\Temp\pip-install-i2jc_2zl\rpy2\
Complete output (91 lines):
C:\Users\rahul\anaconda3\lib\site-packages\cffi\cparser.py:164: UserWarning: Global variable 'R_NaN' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
C:\Users\rahul\anaconda3\lib\site-packages\cffi\cparser.py:164: UserWarning: Global variable 'R_NaReal' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
C:\Users\rahul\anaconda3\lib\site-packages\cffi\cparser.py:164: UserWarning: Global variable 'R_NaInt' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
C:\Users\rahul\anaconda3\lib\site-packages\cffi\cparser.py:164: UserWarning: Global variable 'R_NaString' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
C:\Users\rahul\anaconda3\lib\site-packages\cffi\cparser.py:164: UserWarning: Global variable 'R_BlankString' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
C:\Users\rahul\anaconda3\lib\site-packages\cffi\cparser.py:164: UserWarning: Global variable 'R_BlankScalarString' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
C:\Users\rahul\anaconda3\lib\site-packages\cffi\cparser.py:164: UserWarning: Global variable 'R_GlobalEnv' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
C:\Users\rahul\anaconda3\lib\site-packages\cffi\cparser.py:164: UserWarning: Global variable 'R_EmptyEnv' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
C:\Users\rahul\anaconda3\lib\site-packages\cffi\cparser.py:164: UserWarning: Global variable 'R_BaseEnv' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
C:\Users\rahul\anaconda3\lib\site-packages\cffi\cparser.py:164: UserWarning: Global variable 'R_BaseNamespace' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
C:\Users\rahul\anaconda3\lib\site-packages\cffi\cparser.py:164: UserWarning: Global variable 'R_BaseNamespaceRegistry' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
C:\Users\rahul\anaconda3\lib\site-packages\cffi\cparser.py:164: UserWarning: Global variable 'R_NilValue' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
C:\Users\rahul\anaconda3\lib\site-packages\cffi\cparser.py:164: UserWarning: Global variable 'R_UnboundValue' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
C:\Users\rahul\anaconda3\lib\site-packages\cffi\cparser.py:164: UserWarning: Global variable 'R_MissingArg' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
C:\Users\rahul\anaconda3\lib\site-packages\cffi\cparser.py:164: UserWarning: Global variable 'R_ClassSymbol' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
C:\Users\rahul\anaconda3\lib\site-packages\cffi\cparser.py:164: UserWarning: Global variable 'R_NameSymbol' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
C:\Users\rahul\anaconda3\lib\site-packages\cffi\cparser.py:164: UserWarning: Global variable 'R_DimSymbol' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
Traceback (most recent call last):
  File "C:\Users\rahul\anaconda3\lib\site-packages\cffi\cparser.py", line 305, in _parse
    ast = _get_parser().parse(fullcsource)
  File "C:\Users\rahul\anaconda3\lib\site-packages\pycparser\c_parser.py", line 152, in parse
    debug=debuglevel)
  File "C:\Users\rahul\anaconda3\lib\site-packages\pycparser\ply\yacc.py", line 331, in parse
    return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
  File "C:\Users\rahul\anaconda3\lib\site-packages\pycparser\ply\yacc.py", line 1199, in parseopt_notrack
    tok = call_errorfunc(self.errorfunc, errtoken, self)
  File "C:\Users\rahul\anaconda3\lib\site-packages\pycparser\ply\yacc.py", line 193, in call_errorfunc
    r = errorfunc(token)
  File "C:\Users\rahul\anaconda3\lib\site-packages\pycparser\c_parser.py", line 1848, in p_error
    column=self.clex.find_tok_column(p)))
  File "C:\Users\rahul\anaconda3\lib\site-packages\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\rahul\AppData\Local\Temp\pip-install-i2jc_2zl\rpy2\setup.py", line 184, in <module>
    'rpy2': ['doc/source/rpy2_logo.png', ]}
  File "C:\Users\rahul\anaconda3\lib\site-packages\setuptools\__init__.py", line 144, in setup
    return distutils.core.setup(**attrs)
  File "C:\Users\rahul\anaconda3\lib\distutils\core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "C:\Users\rahul\anaconda3\lib\site-packages\setuptools\dist.py", line 448, in __init__
    k: v for k, v in attrs.items()
  File "C:\Users\rahul\anaconda3\lib\distutils\dist.py", line 292, in __init__
    self.finalize_options()
  File "C:\Users\rahul\anaconda3\lib\site-packages\setuptools\dist.py", line 740, in finalize_options
    ep.load()(self)
  File "C:\Users\rahul\anaconda3\lib\site-packages\setuptools\dist.py", line 747, in _finalize_setup_keywords
    ep.load()(self, ep.name, value)
  File "C:\Users\rahul\anaconda3\lib\site-packages\cffi\setuptools_ext.py", line 217, in cffi_modules
    add_cffi_module(dist, cffi_module)
  File "C:\Users\rahul\anaconda3\lib\site-packages\cffi\setuptools_ext.py", line 49, in add_cffi_module
    execfile(build_file_name, mod_vars)
  File "C:\Users\rahul\anaconda3\lib\site-packages\cffi\setuptools_ext.py", line 25, in execfile
    exec(code, glob, glob)
  File "rpy/_rinterface_cffi_build.py", line 546, in <module>
    """ if os.name == 'nt' else ''
  File "C:\Users\rahul\anaconda3\lib\site-packages\cffi\api.py", line 112, in cdef
    self._cdef(csource, override=override, packed=packed, pack=pack)
  File "C:\Users\rahul\anaconda3\lib\site-packages\cffi\api.py", line 126, in _cdef
    self._parser.parse(csource, override=override, **options)
  File "C:\Users\rahul\anaconda3\lib\site-packages\cffi\cparser.py", line 358, in parse
    self._internal_parse(csource)
  File "C:\Users\rahul\anaconda3\lib\site-packages\cffi\cparser.py", line 363, in _internal_parse
    ast, macros, csource = self._parse(csource)
  File "C:\Users\rahul\anaconda3\lib\site-packages\cffi\cparser.py", line 307, in _parse
    self.convert_pycparser_error(e, csource)
  File "C:\Users\rahul\anaconda3\lib\site-packages\cffi\cparser.py", line 336, 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.

chuiqin commented 4 years ago

I have the same problem.

chuiqin commented 4 years ago

Did you solve the issue?

rahulnutron commented 4 years ago

Hi, I just installed in on Linux/Ubuntu, that solved my problem. However, not on windows.

chuiqin commented 4 years ago

Thank you for your answer.I try it again.


发件人: Rahul Shaw notifications@github.com 发送时间: 2020年5月24日 14:24:34 收件人: Teichlab/cellphonedb cellphonedb@noreply.github.com 抄送: 范垂钦 19cqfan@stu.edu.cn; Comment comment@noreply.github.com 主题: Re: [Teichlab/cellphonedb] error during installation: cffi.CDefError: cannot parse "blah1 ReadConsole (#168)

Hi, I just installed in on Linux/Ubuntu, that solved my problem. However, not on windows.

― You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Teichlab/cellphonedb/issues/168#issuecomment-633186136, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APWKDPESH2UFZMFJZVYBBADRTC4SFANCNFSM4M3OEHKQ.

abappal commented 4 years ago

I have the same error installing i windows. Can anyone help with this installation error.

Thank You!

JohnWang1997 commented 4 years ago

You can easily solve this problem by using the following command: pip install CellPhoneDBu, and then you can use it on Windows

seigfried commented 4 years ago

, line 336, in convert_pycparser_error raise CDefError(msg) cffi.CDefError: cannot parse "blah1 ReadConsole;"

: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 have rpy2 (3.3.2) installed in my environment via Anaconda Navigator and I still get this error. I tried installing CellPhoneDBu but it gives the same error.
jliu678 commented 3 years ago

You can easily solve this problem by using the following command: pip install CellPhoneDBu, and then you can use it on Windows

CellPhoneDBu I think is a different module

mcap91 commented 3 years ago

same problem trying to install on local Windows 10 PC using python 3.7. Any updates?

LClungcancer commented 3 years ago

CellPhoneDBU - -|