pik-copan / pyunicorn

Unified Complex Network and Recurrence Analysis Toolbox
http://pik-potsdam.de/~donges/pyunicorn/
Other
195 stars 86 forks source link

Python 3.9.5 Build failure => error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’ #154

Closed rahu12t111 closed 2 years ago

rahu12t111 commented 2 years ago

I ran pip install pyunicorn and python setup.py install on python 3.9.5 and the output gave an error in both case :

 `pyunicorn/climate/_ext/numerics.c: In function ‘__Pyx__ExceptionSave’:

  pyunicorn/climate/_ext/numerics.c:6421:21: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
   6421 |     *type = tstate->exc_type;
        |                     ^~~~~~~~
        |                     curexc_type
  pyunicorn/climate/_ext/numerics.c:6422:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
   6422 |     *value = tstate->exc_value;
        |                      ^~~~~~~~~
        |                      curexc_value
  pyunicorn/climate/_ext/numerics.c:6423:19: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
   6423 |     *tb = tstate->exc_traceback;
        |                   ^~~~~~~~~~~~~
        |                   curexc_traceback
  pyunicorn/climate/_ext/numerics.c: In function ‘__Pyx__ExceptionReset’:
  pyunicorn/climate/_ext/numerics.c:6430:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
   6430 |     tmp_type = tstate->exc_type;
        |                        ^~~~~~~~
        |                        curexc_type
  pyunicorn/climate/_ext/numerics.c:6431:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
   6431 |     tmp_value = tstate->exc_value;
        |                         ^~~~~~~~~
        |                         curexc_value
  pyunicorn/climate/_ext/numerics.c:6432:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
   6432 |     tmp_tb = tstate->exc_traceback;
        |                      ^~~~~~~~~~~~~
        |                      curexc_traceback
  pyunicorn/climate/_ext/numerics.c:6433:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
   6433 |     tstate->exc_type = type;
        |             ^~~~~~~~
        |             curexc_type
  pyunicorn/climate/_ext/numerics.c:6434:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
   6434 |     tstate->exc_value = value;
        |             ^~~~~~~~~
        |             curexc_value
  pyunicorn/climate/_ext/numerics.c:6435:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
   6435 |     tstate->exc_traceback = tb;
        |             ^~~~~~~~~~~~~
        |             curexc_traceback
  pyunicorn/climate/_ext/numerics.c: In function ‘__Pyx__GetException’:
  pyunicorn/climate/_ext/numerics.c:6490:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
   6490 |     tmp_type = tstate->exc_type;
        |                        ^~~~~~~~
        |                        curexc_type
  pyunicorn/climate/_ext/numerics.c:6491:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
   6491 |     tmp_value = tstate->exc_value;
        |                         ^~~~~~~~~
        |                         curexc_value
  pyunicorn/climate/_ext/numerics.c:6492:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
   6492 |     tmp_tb = tstate->exc_traceback;
        |                      ^~~~~~~~~~~~~
        |                      curexc_traceback
  pyunicorn/climate/_ext/numerics.c:6493:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
   6493 |     tstate->exc_type = local_type;
        |             ^~~~~~~~
        |             curexc_type
  pyunicorn/climate/_ext/numerics.c:6494:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
   6494 |     tstate->exc_value = local_value;
        |             ^~~~~~~~~
        |             curexc_value
  pyunicorn/climate/_ext/numerics.c:6495:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
   6495 |     tstate->exc_traceback = local_tb;
        |             ^~~~~~~~~~~~~
        |             curexc_traceback
  error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1`

How can I get rid of this issue ?

lenas95 commented 2 years ago

Hi,

could you check which Version of cython you are using? some are not compatible with certain python versions. If not installed, please try with pip3 install cython. Cython version >= 27.x is a required dependency and has been added recently to the requirements.

Let me know if there are further issues.

ntfrgl commented 2 years ago

Thank you for reporting this issue, and please accept our apologies for our delay in providing a rigorous solution. This set of problems should be fully resolved with the commit linked above, which will be reflected in an upcoming new release including official wheels. I'm tentatively closing this ticket, but please let us know in case you have any trouble installing pyunicorn from the current master branch, in which case we will attempt to find a solution as quickly as possible.

Cython is now declared as a build dependency, which means that your Python package manager (e.g., pip) is responsible for automatically providing the Cython compiler without any user intervention. After the package installation process is completed, Cython is not required as a runtime dependency. The version information is now retrieved via importlib.metadata from the Python standard library.