You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
when installing k-means-constrained in python3.8 environment with numpy < 1.20 (i.e. 1.19.5) on linux, import fails due to numpy binary incompatibility.
Details:
I think the root cause is that during package installation (PEP-517) the numpy that is used to compile the package is numpy>1.13 (as described in pyproject.toml). on python 3.8 this will collect 1.20 (in python 3.6 it will collect 1.19.5).
so the package is built with numpy1.20 but if my environment has a different numpy (1.19.5) there is some binary incompatibility issue.
maybe its better to remove numpy from pyproject.toml and let it use the installed numpy instead?
Minimum working example
Python 3.8.9 (default, Apr 3 2021, 01:00:00)
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from k_means_constrained import KMeansConstrained
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/e101364/views/1v_main/Qstreams/provision-algobb/assaf/lib/python3.8/site-packages/k_means_constrained/__init__.py", line 4, in <module>
from .k_means_constrained_ import KMeansConstrained
File "/home/e101364/views/1v_main/Qstreams/provision-algobb/assaf/lib/python3.8/site-packages/k_means_constrained/k_means_constrained_.py", line 18, in <module>
from .sklearn_import.metrics.pairwise import euclidean_distances
File "/home/e101364/views/1v_main/Qstreams/provision-algobb/assaf/lib/python3.8/site-packages/k_means_constrained/sklearn_import/metrics/pairwise.py", line 10, in <module>
from k_means_constrained.sklearn_import.metrics.pairwise_fast import _sparse_manhattan
File "k_means_constrained/sklearn_import/metrics/pairwise_fast.pyx", line 1, in init k_means_constrained.sklearn_import.metrics.pairwise_fast
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject
Versions:
Python: 3.8.9
Operating system: linux (ubuntu18.04)
k-means-constrained: 0.5.2
numpy: 1.19.5
scipy: 1.6.3
ortools: 9.0.9048
joblib: 1.0.1
cython (if installed):
Thanks
The text was updated successfully, but these errors were encountered:
Thanks for the bug report. Sorry it's taken me so long to get to it. I have updated the dependencies and corresponding tests. The latest version v0.6.0 should work: https://pypi.org/project/k-means-constrained/0.6.0/
Describe the bug
when installing k-means-constrained in python3.8 environment with numpy < 1.20 (i.e. 1.19.5) on linux, import fails due to numpy binary incompatibility.
Details:
I think the root cause is that during package installation (PEP-517) the numpy that is used to compile the package is numpy>1.13 (as described in pyproject.toml). on python 3.8 this will collect 1.20 (in python 3.6 it will collect 1.19.5).
so the package is built with numpy1.20 but if my environment has a different numpy (1.19.5) there is some binary incompatibility issue.
maybe its better to remove numpy from pyproject.toml and let it use the installed numpy instead?
Minimum working example
Versions:
Thanks
The text was updated successfully, but these errors were encountered: