Skip to content
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

ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject #37

Closed
manamhr opened this issue Nov 8, 2022 · 2 comments

Comments

@manamhr
Copy link

manamhr commented Nov 8, 2022

Describe the bug
A clear and concise description of what the bug is.

While importing the library, this error happens:
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
so I did following command to downgrade numpy and install k_means_constrained again:

Minimum working example
Code and minimum data to reproduce the error. The example should be copy and pastable to reproduce the problem:
from k_means_constrained import KMeansConstrained

Versions:

  • Python: 3.9.7
  • Operating system: [MacOS]
  • k-means-constrained: 0.7.2
  • numpy:1.23.4
  • scipy:1.7.3
  • ortools:9.4.1874
  • joblib:1.1.0
  • cython (if installed):0.29.24

I installed k_means_constrained which upgraded numpy to 1.23.4 and when importing k_means_constrained created

ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
so I did following command to downgrade numpy and install k_means_constrained again:

!pip uninstall numpy -y
!conda install -y -c conda-forge numpy
!pip uninstall k_means_constrained -y
!pip install k_means_constrained --no-binary k_means_constrained
right now I have k-means-constrained-0.7.2, numpy to 1.23.4 and still same error. even changed to k-means-constrained-0.7.0 and numpy to 1.21.5 still same error I have this issue on my Apple M1 pro, Anaconda environment, Python 3.9.7.
Any advice?

@manamhr manamhr changed the title [BUG] ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject Nov 8, 2022
@manamhr manamhr closed this as completed Nov 9, 2022
@joshlk
Copy link
Owner

joshlk commented Jan 11, 2023

Hi @kellyvos, can you please provide the numpy, k-means-constrained and Python version you are using?

@kellyvos
Copy link

Hi @kellyvos, can you please provide the numpy, k-means-constrained and Python version you are using?

I'm sorry I made a mistake

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants