-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incompatibility with numpy 2.x? #59
Comments
Mixing and matching where things are installed from could be a problem. Just using pip works fine:
|
Interesting! I am not sure about the conda environment shown in that log -- it looks like it does not contain an explicitly installed version of Python for this environment? (Since the I tried to reproduce a more "consistent" install than I had before (only installing Python using conda, and installing everything else using pip) and still ran into the problem: $ mamba create -n iowtest-again
$ conda activate iowtest-again
$ mamba install python=3.10
$ which pip
/home/marcus/anaconda3/envs/iowtest-again/bin/pip
$ pip install iow # installs iow 1.0.7, numpy 2.2.0, Cython 0.29.37, ...
$ python3
Python 3.10.15 (main, Oct 3 2024, 07:27:34) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import bp
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/marcus/anaconda3/envs/iowtest-again/lib/python3.10/site-packages/bp/__init__.py", line 8, in <module>
from ._bp import BP
File "bp/_bp.pyx", line 1, in init bp._bp
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject (One terrifying idea I had was that this could be a mamba vs. conda issue, but I repeated the above steps using conda instead of mamba and again reproduced the error. So thankfully that's not it.) |
Can you use CPython from
|
Got it. Tried three things -- strangely, none of them seemed to resolve the issue: 1. Installing
|
Thanks |
From biocore/empress#567. Replicated this issue on Ubuntu.
I verified that the problem persists with Python 3.9 and numpy 2.0.x:
The issue can be resolved by downgrading numpy to a version earlier than 2.x:
... but from what I can tell, iow is intended to support numpy 2.x. Not sure if something has changed upstream recently that breaks things -- figured I should pass this on if you haven't already seen this problem. Thanks!
The text was updated successfully, but these errors were encountered: