title: Python3.7 mlpy installation error - 'PyThreadState {aka struct _ts}' has no member named 'exc_type'
body: <p>Trying to install mlpy 3.5.0 in a virtual environment on macOS Catalina, I am getting an error. </p>
  
  <pre><code>In file included from /Users/martin/.virtualenvs/BA/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1832:0,
                   from /Users/martin/.virtualenvs/BA/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                   from /Users/martin/.virtualenvs/BA/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                   from mlpy/gsl/gsl.c:227:
  /Users/martin/.virtualenvs/BA/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   #warning "Using deprecated NumPy API, disable it with " \
    ^
  mlpy/gsl/gsl.c: In function '__pyx_pf_4mlpy_3gsl_2stats_quantile_from_sorted_data':
  mlpy/gsl/gsl.c:921:14: warning: variable '__pyx_bshape_0_sorted_data_arr' set but not used [-Wunused-but-set-variable]
     Py_ssize_t __pyx_bshape_0_sorted_data_arr = 0;
                ^
  mlpy/gsl/gsl.c:920:14: warning: variable '__pyx_bstride_0_sorted_data_arr' set but not used [-Wunused-but-set-variable]
     Py_ssize_t __pyx_bstride_0_sorted_data_arr = 0;
                ^
  mlpy/gsl/gsl.c: In function '__Pyx_GetException':
  mlpy/gsl/gsl.c:4027:22: error: 'PyThreadState {aka struct _ts}' has no member named 'exc_type'
       tmp_type = tstate-&gt;exc_type;
                        ^
  mlpy/gsl/gsl.c:4028:23: error: 'PyThreadState {aka struct _ts}' has no member named 'exc_value'
       tmp_value = tstate-&gt;exc_value;
                         ^
  mlpy/gsl/gsl.c:4029:20: error: 'PyThreadState {aka struct _ts}' has no member named 'exc_traceback'
       tmp_tb = tstate-&gt;exc_traceback;
                      ^
  mlpy/gsl/gsl.c:4030:11: error: 'PyThreadState {aka struct _ts}' has no member named 'exc_type'
       tstate-&gt;exc_type = local_type;
             ^
  mlpy/gsl/gsl.c:4031:11: error: 'PyThreadState {aka struct _ts}' has no member named 'exc_value'
       tstate-&gt;exc_value = local_value;
             ^
  mlpy/gsl/gsl.c:4032:11: error: 'PyThreadState {aka struct _ts}' has no member named 'exc_traceback'
       tstate-&gt;exc_traceback = local_tb;
             ^
  mlpy/gsl/gsl.c: In function '__Pyx_ExceptionSave':
  mlpy/gsl/gsl.c:4222:19: error: 'PyThreadState {aka struct _ts}' has no member named 'exc_type'
       *type = tstate-&gt;exc_type;
                     ^
  mlpy/gsl/gsl.c:4223:20: error: 'PyThreadState {aka struct _ts}' has no member named 'exc_value'
       *value = tstate-&gt;exc_value;
                      ^
  mlpy/gsl/gsl.c:4224:17: error: 'PyThreadState {aka struct _ts}' has no member named 'exc_traceback'
       *tb = tstate-&gt;exc_traceback;
                   ^
  mlpy/gsl/gsl.c: In function '__Pyx_ExceptionReset':
  mlpy/gsl/gsl.c:4233:22: error: 'PyThreadState {aka struct _ts}' has no member named 'exc_type'
       tmp_type = tstate-&gt;exc_type;
                        ^
  mlpy/gsl/gsl.c:4234:23: error: 'PyThreadState {aka struct _ts}' has no member named 'exc_value'
       tmp_value = tstate-&gt;exc_value;
                         ^
  mlpy/gsl/gsl.c:4235:20: error: 'PyThreadState {aka struct _ts}' has no member named 'exc_traceback'
       tmp_tb = tstate-&gt;exc_traceback;
                      ^
  mlpy/gsl/gsl.c:4236:11: error: 'PyThreadState {aka struct _ts}' has no member named 'exc_type'
       tstate-&gt;exc_type = type;
             ^
  mlpy/gsl/gsl.c:4237:11: error: 'PyThreadState {aka struct _ts}' has no member named 'exc_value'
       tstate-&gt;exc_value = value;
             ^
  mlpy/gsl/gsl.c:4238:11: error: 'PyThreadState {aka struct _ts}' has no member named 'exc_traceback'
       tstate-&gt;exc_traceback = tb;
             ^
  In file included from /Users/martin/.virtualenvs/BA/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:21:0,
                   from /Users/martin/.virtualenvs/BA/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                   from mlpy/gsl/gsl.c:227:
  mlpy/gsl/gsl.c: At top level:
  /Users/martin/.virtualenvs/BA/lib/python3.7/site-packages/numpy/core/include/numpy/__multiarray_api.h:1463:1 warning: '_import_array' defined but not used [-Wunused-function]
   _import_array(void)
   ^
  error: command 'gcc-5' failed with exit status 1 
  </code></pre>
  
  <p>I guess the solution is related to <a href="https://stackoverflow.com/a/53133851/13379447">this answer</a>, but I can not get it to work as I am not used to the C++ syntax. Where would I need to insert </p>
  
  <pre><code>    #define exc_type       exc_state.exc_type
      #define exc_value      exc_state.exc_value
      #define exc_traceback  exc_state.exc_traceback 
  </code></pre>
  
  <p>in the file /usr/include/python3.7m/pystate.h or in my case the file in my virtual environment?</p>