CeleScope icon indicating copy to clipboard operation
CeleScope copied to clipboard

numpy.dtype size changed

Open biobirds9 opened this issue 1 year ago • 4 comments

Hello! Thank you for such an excellent software.

I am trying to run CeleScope to test , but it throws me the following error.

============================= test session starts ============================== platform linux -- Python 3.9.19, pytest-8.2.2, pluggy-1.5.0 rootdir: /public/home/hpc236503011/Celescope/test_dir/celescope_test_script collected 0 items / 1 error

==================================== ERRORS ==================================== ________________________ ERROR collecting test_multi.py ________________________ test_multi.py:9: in import celescope.tools.utils as utils ../../../.conda/envs/celescope/lib/python3.9/site-packages/celescope/tools/utils.py:18: in import pandas as pd ../../../.conda/envs/celescope/lib/python3.9/site-packages/pandas/init.py:22: in from pandas.compat import is_numpy_dev as _is_numpy_dev ../../../.conda/envs/celescope/lib/python3.9/site-packages/pandas/compat/init.py:15: in from pandas.compat.numpy import ( ../../../.conda/envs/celescope/lib/python3.9/site-packages/pandas/compat/numpy/init.py:4: in from pandas.util.version import Version ../../../.conda/envs/celescope/lib/python3.9/site-packages/pandas/util/init.py:1: in from pandas.util._decorators import ( # noqa:F401 ../../../.conda/envs/celescope/lib/python3.9/site-packages/pandas/util/_decorators.py:14: in from pandas._libs.properties import cache_readonly # noqa:F401 ../../../.conda/envs/celescope/lib/python3.9/site-packages/pandas/_libs/init.py:13: in from pandas._libs.interval import Interval pandas/_libs/interval.pyx:1: in init pandas._libs.interval ??? E ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject =========================== short test summary info ============================ ERROR test_multi.py - ValueError: numpy.dtype size changed, may indicate bina... !!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! =============================== 1 error in 8.74s ===============================

I found out that it's because the numpy package version is too high, but it's not possible to install a lower version of numpy. What can I do to fix it?

biobirds9 avatar Jun 26 '24 11:06 biobirds9

I think you can downgrade numpy to 1.26 pip install numpy==1.26 https://stackoverflow.com/questions/78634235/numpy-dtype-size-changed-may-indicate-binary-incompatibility-expected-96-from

Besides, I recommend using nf-celescope instead of celescope.

zhouyiqi91 avatar Jun 27 '24 13:06 zhouyiqi91

Just to add that downgrading pandas also helps. We helped someone out by suggesting to downgrade pandas to 1.4.2

Khillo81 avatar Jul 03 '24 11:07 Khillo81

I think you can downgrade numpy to 1.26 pip install numpy==1.26 https://stackoverflow.com/questions/78634235/numpy-dtype-size-changed-may-indicate-binary-incompatibility-expected-96-from

Besides, I recommend using nf-celescope instead of celescope.

Thank you very much for your reply, this suggestion worked, thanks again for your work!

biobirds9 avatar Jul 07 '24 07:07 biobirds9

https://stackoverflow.com/questions/78650222/valueerror-numpy-dtype-size-changed-may-indicate-binary-incompatibility-expec

RubTalha avatar Jul 08 '24 19:07 RubTalha