Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install thriftpy2 Error #165

Open
WanXinTao opened this issue Feb 27, 2021 · 13 comments
Open

pip install thriftpy2 Error #165

WanXinTao opened this issue Feb 27, 2021 · 13 comments
Assignees
Labels
enhancement New feature or request

Comments

@WanXinTao
Copy link

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?

@ethe
Copy link
Member

ethe commented Feb 27, 2021

which version of cython you use

@WanXinTao
Copy link
Author

Python 2.7.13

which version of cython you use

@WanXinTao
Copy link
Author

cython

Name: Cython
Version: 0.17.4

@aisk
Copy link
Member

aisk commented Feb 27, 2021

I think you are using GCC4. Please upgrade GCC version.

@lionel-xie
Copy link

@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?

@aisk
Copy link
Member

aisk commented Jul 15, 2021

@xxd819240366 upgrade GCC to higher version should resolve this issue.

@lionel-xie
Copy link

@aisk OK, thanks. I'll try it.

@chenyanlann
Copy link

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

@aisk
Copy link
Member

aisk commented Jan 17, 2022

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.

@chenyanlann
Copy link

thanks for reply
More information can be found here:
cython/cython#203
0.18 change log

@aisk aisk self-assigned this Apr 2, 2024
@aisk aisk added the enhancement New feature or request label Apr 2, 2024
@DCSong
Copy link

DCSong commented Apr 23, 2024

I meet the same problem with python2.7.18, cython 3.0.10, GCC 8.3.0

@WanXinTao
Copy link
Author

WanXinTao commented Apr 23, 2024 via email

@aisk
Copy link
Member

aisk commented Apr 23, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants