jmschrei / pomegranate

Fast, flexible and easy to use probabilistic modelling in Python.
http://pomegranate.readthedocs.org/en/latest/
MIT License
3.35k stars 589 forks source link

[BUG] Import fails after installing v0.14.8 #989

Closed megawattfs closed 1 year ago

megawattfs commented 2 years ago

Describe the bug Import failed with error message "ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject."

To Reproduce I ran the installation and attempted to import pomegranate from a Jupyter notebook (see photo attached): !pip install pomegranate import pomegranate image

megawattfs commented 2 years ago

Note: I tried a few earlier versions and had the same problem. I have used pomegranate without incident before.

dolevamir commented 2 years ago

you might need to revert to an older version of numpy in order to solve this

megawattfs commented 2 years ago

Even with numpy 1.20.0 (the minimum required) it is still like this--I have tried with several versions of numpy and several versions of pomegranate

jmschrei commented 2 years ago

Sorry that you're encountering issues. I'm currently rewriting pomegranate from the ground up using PyTorch, so all these installation issues should be resolved then.

li-xie commented 2 years ago

I had the same problem with 14.8. I had to go through the following steps to get rid of the error: pip uninstall -y numpy pip uninstall -y scipy pip uninstall -y setuptools pip install setuptools pip install numpy pip install scipy

amyfonget commented 1 year ago

Has anyone found a solution? I tried li-xie's suggestion but that didn't change things for me.

jmschrei commented 1 year ago

Thank you for opening an issue. pomegranate has recently been rewritten from the ground up to use PyTorch instead of Cython (v1.0.0), and so all issues are being closed as they are likely out of date. Please re-open or start a new issue if a related issue is still present in the new codebase.