thriftpy2
thriftpy2 copied to clipboard
pip install thriftpy2 Error
ERROR: Command errored out with exit status 1: command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-yTiVHp/thriftpy2/setup.py'"'"'; file='"'"'/tmp/pip-install-yTiVHp/thriftpy2/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 /tmp/pip-pip-egg-info-_HKYAq cwd: /tmp/pip-install-yTiVHp/thriftpy2/ Complete output (39 lines):
Error compiling Cython file:
------------------------------------------------------------
...
char *buf
int cur, buf_size, data_size
void move_to_start(self)
void clean(self)
int write(self, int sz, const char *value)
^
------------------------------------------------------------
thriftpy2/transport/cybase.pxd:12:43: Expected ')', found '*'
Error compiling Cython file:
------------------------------------------------------------
...
cdef void clean(self):
self.cur = 0
self.data_size = 0
cdef int write(self, int sz, const char *value):
^
------------------------------------------------------------
thriftpy2/transport/cybase.pyx:25:44: Expected ')', found '*'
Compiling thriftpy2/transport/cybase.pyx because it depends on /opt/tiger/ss_lib/python_package/lib/python2.7/site-packages/Cython/Includes/libc/string.pxd.
Cythonizing thriftpy2/transport/cybase.pyx
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-yTiVHp/thriftpy2/setup.py", line 59, in <module>
cythonize("thriftpy2/transport/cybase.pyx")
File "/opt/tiger/ss_lib/python_package/lib/python2.7/site-packages/Cython/Build/Dependencies.py", line 667, in cythonize
cythonize_one(*args[1:])
File "/opt/tiger/ss_lib/python_package/lib/python2.7/site-packages/Cython/Build/Dependencies.py", line 731, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: thriftpy2/transport/cybase.pyx
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
How to solve this problem?
which version of cython you use
Python 2.7.13
which version of cython you use
cython
Name: Cython Version: 0.17.4
I think you are using GCC4. Please upgrade GCC version.
@WanXinTao @ethe @aisk I have the same problem with you, same python version, the cython version is 0.29.23。Did you solve this problem?
@xxd819240366 upgrade GCC to higher version should resolve this issue.
@aisk OK, thanks. I'll try it.
I think it's because cython version. I encounter the same problem using cython==0.17.4. Upgrading the cython version solved the problem @aisk @xxd819240366
Cool @chenyanlann , I think we should add a pyproject.toml
file to specify the third party dependencies' versions which been used when building, like cython.
thanks for reply More information can be found here: https://github.com/cython/cython/pull/203 0.18 change log
I meet the same problem with python2.7.18, cython 3.0.10, GCC 8.3.0
您好,感谢您给我来信,您的邮件我已收到。Thanks
I meet the same problem with python2.7.18, cython 3.0.10, GCC 8.3.0
Please paste you error log. If it's not exactly same as the issue shows, please open a new issue.