fishers_exact_test icon indicating copy to clipboard operation
fishers_exact_test copied to clipboard

Import error from numpy compilation

Open PauBadiaM opened this issue 2 years ago • 6 comments

Hi,

First of all I wanted to thank you for this amazing package, this implementation of Fisher's exact test is insanely fast!

I'm developing a package and I would like to include fisher as a dependancy. The problem is, that recently (2022/01/31) my GitHub's Continuous Integration started breaking apart (I found out by updating some documentation, so not changing any dependencies), this is the error:

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/unittest/__main__.py", line 18, in <module>
    main(module=None)
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/unittest/main.py", line 100, in __init__
    self.parseArgs(argv)
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/unittest/main.py", line 147, in parseArgs
    self.createTests()
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/unittest/main.py", line 158, in createTests
    self.test = self.testLoader.loadTestsFromNames(self.testNames,
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/unittest/loader.py", line 220, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/unittest/loader.py", line 220, in <listcomp>
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
  File "/home/runner/work/decoupler-py/decoupler-py/tests/test_methods.py", line 2, in <module>
    import decoupler as dc
  File "/home/runner/work/decoupler-py/decoupler-py/decoupler/__init__.py", line 7, in <module>
    from .method_ora import run_ora
  File "/home/runner/work/decoupler-py/decoupler-py/decoupler/method_ora.py", line 14, in <module>
    from fisher import pvalue_npy
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/fisher/__init__.py", line 3, in <module>
    from .cfisher import *
  File "__init__.pxd", line 242, in init cfisher
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
Error: Process completed with exit code 1.

Basically it breaks when importing fisher. Since the packages are exactly the same version as before, I'm very puzzled on what could be happening. Apparently is something about numpy being compiled in different versions across packages. The dependencies installed are:

Package           Version
----------------- -------
anndata           0.7.8
bleach            3.3.0
decoupler         0.0.1
fisher            0.1.9
h5py              3.6.0
jeepney           0.6.0
joblib            1.1.0
keyring           23.0.1
llvmlite          0.37.0
natsort           8.1.0
numba             0.54.1
numpy             1.20.3
packaging         21.3
pandas            1.4.0
pip               22.0.3
pkginfo           1.7.0
pyparsing         3.0.7
python-dateutil   2.8.2
pytz              2021.3
readme-renderer   29.0
requests-toolbelt 0.9.1
rfc3986           1.4.0
scikit-learn      0.24.2
scikit-misc       0.1.3
scipy             1.8.0
SecretStorage     3.3.1
setuptools        60.7.1
six               1.16.0
sklearn           0.0
skranger          0.7.0
threadpoolctl     3.1.0
tqdm              4.62.3
webencodings      0.5.1
wheel             0.36.2
xlrd              1.2.0

I'm installing the package via pip, could this be a problem? Have you seen something similar, or could you know where the error is coming from?

Thank you for your time

PauBadiaM avatar Feb 07 '22 17:02 PauBadiaM