Open ghost opened 2 years ago
I had the exact same issue using continuumio/miniconda3 in Docker. For some reason, it works with python=3.8.
my friends helps me find the reason, https://docs.python.org/3.9/c-api/typeobj.html#c.PyTypeObject.tp_vectorcall_offset
(gluon) root@ops-test:/home/sunchen/pose/cocoapi/PythonAPI/PythonAPI# sh install.sh running install /root/miniconda3/envs/sunchen-gluon/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( /root/miniconda3/envs/sunchen-gluon/lib/python3.9/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools. warnings.warn( running bdist_egg running egg_info writing crowdposetools.egg-info/PKG-INFO writing dependency_links to crowdposetools.egg-info/dependency_links.txt writing top-level names to crowdposetools.egg-info/top_level.txt reading manifest file 'crowdposetools.egg-info/SOURCES.txt' writing manifest file 'crowdposetools.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_py running build_ext building 'crowdposetools._mask' extension gcc -pthread -B /root/miniconda3/envs/gluon/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /root/miniconda3/envs/gluon/include -fPIC -O2 -isystem /root/miniconda3/envs/gluon/include -fPIC -I/root/miniconda3/envs/sunchen-gluon/lib/python3.9/site-packages/numpy/core/include -I../common -I/root/miniconda3/envs/gluon/include/python3.9 -c ../common/maskApi.c -o build/temp.linux-x86_64-cpython-39/../common/maskApi.o -Wno-cpp -Wno-unused-function -std=c99 gcc -pthread -B /root/miniconda3/envs/gluon/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /root/miniconda3/envs/gluon/include -fPIC -O2 -isystem /root/miniconda3/envs/gluon/include -fPIC -I/root/miniconda3/envs/sunchen-gluon/lib/python3.9/site-packages/numpy/core/include -I../common -I/root/miniconda3/envs/gluon/include/python3.9 -c crowdposetools/_mask.c -o build/temp.linux-x86_64-cpython-39/crowdposetools/_mask.o -Wno-cpp -Wno-unused-function -std=c99 crowdposetools/_mask.c: In function ‘Pyx_modinit_type_init_code’: crowdposetools/_mask.c:12158:42: error: ‘PyTypeObject {aka struct _typeobject}’ has no member named ‘tp_print’ __pyx_type_14crowdposetools_5_mask_RLEs.tp_print = 0; ^ crowdposetools/_mask.c:12163:43: error: ‘PyTypeObject {aka struct _typeobject}’ has no member named ‘tp_print’ pyx_type_14crowdposetools_5_mask_Masks.tp_print = 0; ^ crowdposetools/_mask.c: In function ‘__Pyx_ParseOptionalKeywords’: crowdposetools/_mask.c:12747:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] (PyUnicode_GET_SIZE(name) != PyUnicode_GET_SIZE(key)) ? 1 : ^ In file included from /root/miniconda3/envs/gluon/include/python3.9/unicodeobject.h:1026:0, from /root/miniconda3/envs/gluon/include/python3.9/Python.h:93, from crowdposetools/_mask.c:32: /root/miniconda3/envs/gluon/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { ^ crowdposetools/_mask.c:12747:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations] (PyUnicode_GET_SIZE(*name) != PyUnicode_GET_SIZE(key)) ? 1 : ^ In file included from /root/miniconda3/envs/gluon/include/python3.9/unicodeobject.h:1026:0, from /root/miniconda3/envs/gluon/include/python3.9/Python.h:93, from crowdposetools/_mask.c:32: /root/miniconda3/envs/gluon/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE ) PyUnicode_AsUnicode( ^ crowdposetools/_mask.c:12747:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] (PyUnicode_GET_SIZE(name) != PyUnicode_GET_SIZE(key)) ? 1 : ^ In file included from /root/miniconda3/envs/gluon/include/python3.9/unicodeobject.h:1026:0, from /root/miniconda3/envs/gluon/include/python3.9/Python.h:93, from crowdposetools/_mask.c:32: /root/miniconda3/envs/gluon/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { ^ crowdposetools/_mask.c:12747:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] (PyUnicode_GET_SIZE(name) != PyUnicode_GET_SIZE(key)) ? 1 : ^ In file included from /root/miniconda3/envs/gluon/include/python3.9/unicodeobject.h:1026:0, from /root/miniconda3/envs/gluon/include/python3.9/Python.h:93, from crowdposetools/_mask.c:32: /root/miniconda3/envs/gluon/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { ^ crowdposetools/_mask.c:12747:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations] (PyUnicode_GET_SIZE(*name) != PyUnicode_GET_SIZE(key)) ? 1 : ^ In file included from /root/miniconda3/envs/gluon/include/python3.9/unicodeobject.h:1026:0, from /root/miniconda3/envs/gluon/include/python3.9/Python.h:93, from crowdposetools/_mask.c:32: /root/miniconda3/envs/gluon/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE ) PyUnicode_AsUnicode( ^ crowdposetools/_mask.c:12747:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] (PyUnicode_GET_SIZE(name) != PyUnicode_GET_SIZE(key)) ? 1 : ^ In file included from /root/miniconda3/envs/gluon/include/python3.9/unicodeobject.h:1026:0, from /root/miniconda3/envs/gluon/include/python3.9/Python.h:93, from crowdposetools/_mask.c:32: /root/miniconda3/envs/gluon/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { ^ crowdposetools/_mask.c:12763:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] (PyUnicode_GET_SIZE(argname) != PyUnicode_GET_SIZE(key)) ^ In file included from /root/miniconda3/envs/gluon/include/python3.9/unicodeobject.h:1026:0, from /root/miniconda3/envs/gluon/include/python3.9/Python.h:93, from crowdposetools/_mask.c:32: /root/miniconda3/envs/gluon/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { ^ crowdposetools/_mask.c:12763:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations] (PyUnicode_GET_SIZE(*argname) != PyUnicode_GET_SIZE(key)) ^ In file included from /root/miniconda3/envs/gluon/include/python3.9/unicodeobject.h:1026:0, from /root/miniconda3/envs/gluon/include/python3.9/Python.h:93, from crowdposetools/_mask.c:32: /root/miniconda3/envs/gluon/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE ) PyUnicode_AsUnicode( ^ crowdposetools/_mask.c:12763:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] (PyUnicode_GET_SIZE(argname) != PyUnicode_GET_SIZE(key)) ^ In file included from /root/miniconda3/envs/gluon/include/python3.9/unicodeobject.h:1026:0, from /root/miniconda3/envs/gluon/include/python3.9/Python.h:93, from crowdposetools/_mask.c:32: /root/miniconda3/envs/gluon/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { ^ crowdposetools/_mask.c:12763:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] (PyUnicode_GET_SIZE(argname) != PyUnicode_GET_SIZE(key)) ^ In file included from /root/miniconda3/envs/gluon/include/python3.9/unicodeobject.h:1026:0, from /root/miniconda3/envs/gluon/include/python3.9/Python.h:93, from crowdposetools/_mask.c:32: /root/miniconda3/envs/gluon/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { ^ crowdposetools/_mask.c:12763:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations] (PyUnicode_GET_SIZE(*argname) != PyUnicode_GET_SIZE(key)) ^ In file included from /root/miniconda3/envs/gluon/include/python3.9/unicodeobject.h:1026:0, from /root/miniconda3/envs/gluon/include/python3.9/Python.h:93, from crowdposetools/_mask.c:32: /root/miniconda3/envs/gluon/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE ) PyUnicode_AsUnicode( ^ crowdposetools/_mask.c:12763:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] (PyUnicode_GET_SIZE(argname) != PyUnicode_GET_SIZE(key)) ^ In file included from /root/miniconda3/envs/gluon/include/python3.9/unicodeobject.h:1026:0, from /root/miniconda3/envs/gluon/include/python3.9/Python.h:93, from crowdposetools/_mask.c:32: /root/miniconda3/envs/gluon/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { ^ error: command '/usr/bin/gcc' failed with exit code 1