brentp / fishers_exact_test

Fishers Exact Test for Python (Cython)
BSD 3-Clause "New" or "Revised" License
62 stars 21 forks source link

fisher failed to install on Mac 10.14.1 #23

Open pengyu opened 5 years ago

pengyu commented 5 years ago

I got the following error when I try to install fisher. Does anybody know what is wrong? Thanks.

$ pip3 install -U numpy
Collecting numpy
  Downloading https://files.pythonhosted.org/packages/a6/6f/cb20ccd8f0f8581e0e090775c0e3c3e335b037818416e6fa945d924397d2/numpy-1.16.2-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (13.9MB)
    100% |████████████████████████████████| 13.9MB 1.0MB/s 
Installing collected packages: numpy
  Found existing installation: numpy 1.14.3
    Uninstalling numpy-1.14.3:
      Successfully uninstalled numpy-1.14.3
Successfully installed numpy-1.16.2
$ python3 setup.py  install
running install
running bdist_egg
running egg_info
writing fisher.egg-info/PKG-INFO
writing dependency_links to fisher.egg-info/dependency_links.txt
writing requirements to fisher.egg-info/requires.txt
writing top-level names to fisher.egg-info/top_level.txt
reading manifest file 'fisher.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'fisher.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.9-x86_64/egg
running install_lib
running build_py
running build_ext
building 'fisher.cfisher' extension
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/cfisher.c -o build/temp.macosx-10.9-x86_64-3.7/src/cfisher.o -O3
In file included from src/cfisher.c:242:
In file included from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
In file included from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822:
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: 
      "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it with " \
 ^
src/cfisher.c:4901:134: warning: code will never be executed [-Wunreachable-code]
  ...PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_...
                                                                                                                          ^~~~~~~
src/cfisher.c:6123:134: warning: code will never be executed [-Wunreachable-code]
  ...PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_...
                                                                                                                          ^~~~~~~
src/cfisher.c:8100:138: warning: code will never be executed [-Wunreachable-code]
  ...PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_...
                                                                                                                          ^~~~~~~
src/cfisher.c:8092:137: warning: code will never be executed [-Wunreachable-code]
  ...PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_l...
                                                                                                                         ^~~~~~~
src/cfisher.c:11633:138: warning: code will never be executed [-Wunreachable-code]
  ...PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_...
                                                                                                                          ^~~~~~~
src/cfisher.c:11625:137: warning: code will never be executed [-Wunreachable-code]
  ...PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_l...
                                                                                                                         ^~~~~~~
src/cfisher.c:12250:138: warning: code will never be executed [-Wunreachable-code]
  ...PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_...
                                                                                                                          ^~~~~~~
src/cfisher.c:12242:137: warning: code will never be executed [-Wunreachable-code]
  ...PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_l...
                                                                                                                         ^~~~~~~
src/cfisher.c:20144:21: error: no member named 'exc_type' in 'struct _ts'
    *type = tstate->exc_type;
            ~~~~~~  ^
src/cfisher.c:20145:22: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
    *value = tstate->exc_value;
                     ^~~~~~~~~
                     curexc_value
/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:237:15: note: 'curexc_value' declared here
    PyObject *curexc_value;
              ^
src/cfisher.c:20146:19: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
    *tb = tstate->exc_traceback;
                  ^~~~~~~~~~~~~
                  curexc_traceback
/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:238:15: note: 'curexc_traceback' declared here
    PyObject *curexc_traceback;
              ^
src/cfisher.c:20158:24: error: no member named 'exc_type' in 'struct _ts'
    tmp_type = tstate->exc_type;
               ~~~~~~  ^
src/cfisher.c:20159:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
    tmp_value = tstate->exc_value;
                        ^~~~~~~~~
                        curexc_value
/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:237:15: note: 'curexc_value' declared here
    PyObject *curexc_value;
              ^
src/cfisher.c:20160:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
    tmp_tb = tstate->exc_traceback;
                     ^~~~~~~~~~~~~
                     curexc_traceback
/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:238:15: note: 'curexc_traceback' declared here
    PyObject *curexc_traceback;
              ^
src/cfisher.c:20161:13: error: no member named 'exc_type' in 'struct _ts'
    tstate->exc_type = type;
    ~~~~~~  ^
src/cfisher.c:20162:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
    tstate->exc_value = value;
            ^~~~~~~~~
            curexc_value
/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:237:15: note: 'curexc_value' declared here
    PyObject *curexc_value;
              ^
src/cfisher.c:20163:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
    tstate->exc_traceback = tb;
            ^~~~~~~~~~~~~
            curexc_traceback
/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:238:15: note: 'curexc_traceback' declared here
    PyObject *curexc_traceback;
              ^
src/cfisher.c:20206:24: error: no member named 'exc_type' in 'struct _ts'
    tmp_type = tstate->exc_type;
               ~~~~~~  ^
src/cfisher.c:20207:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
    tmp_value = tstate->exc_value;
                        ^~~~~~~~~
                        curexc_value
/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:237:15: note: 'curexc_value' declared here
    PyObject *curexc_value;
              ^
src/cfisher.c:20208:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
    tmp_tb = tstate->exc_traceback;
                     ^~~~~~~~~~~~~
                     curexc_traceback
/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:238:15: note: 'curexc_traceback' declared here
    PyObject *curexc_traceback;
              ^
src/cfisher.c:20209:13: error: no member named 'exc_type' in 'struct _ts'
    tstate->exc_type = local_type;
    ~~~~~~  ^
src/cfisher.c:20210:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
    tstate->exc_value = local_value;
            ^~~~~~~~~
            curexc_value
/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:237:15: note: 'curexc_value' declared here
    PyObject *curexc_value;
              ^
src/cfisher.c:20211:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
    tstate->exc_traceback = local_tb;
            ^~~~~~~~~~~~~
            curexc_traceback
/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:238:15: note: 'curexc_traceback' declared here
    PyObject *curexc_traceback;
              ^
src/cfisher.c:20233:24: error: no member named 'exc_type' in 'struct _ts'
    tmp_type = tstate->exc_type;
               ~~~~~~  ^
src/cfisher.c:20234:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
    tmp_value = tstate->exc_value;
                        ^~~~~~~~~
                        curexc_value
/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:237:15: note: 'curexc_value' declared here
    PyObject *curexc_value;
              ^
src/cfisher.c:20235:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
    tmp_tb = tstate->exc_traceback;
                     ^~~~~~~~~~~~~
                     curexc_traceback
/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:238:15: note: 'curexc_traceback' declared here
    PyObject *curexc_traceback;
              ^
src/cfisher.c:20236:13: error: no member named 'exc_type' in 'struct _ts'
    tstate->exc_type = *type;
    ~~~~~~  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
9 warnings and 20 errors generated.
error: command 'gcc' failed with exit status 1
$ which gcc
/Library/Developer/CommandLineTools/usr/bin/gcc
brentp commented 5 years ago

I think the .pyx file needs to be translated using a cython from python 3.7+

sarawernig commented 5 years ago

I have the same problem as @pengyu.

greyltc commented 5 years ago

@brentp https://github.com/brentp/fishers_exact_test/pull/22 probaby solves this

lilei1 commented 4 years ago

I've got the same error as @pengyu. I've run pip3 install Cython, but the same issue still came out. Any idea about fixing it? Thanks.