Python 3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import k_means_constrained
Traceback (most recent call last):
File "__init__.pxd", line 942, in numpy.import_array
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/sconstable/local-dev/venv/lib/python3.10/site-packages/k_means_constrained/__init__.py", line 4, in <module>
from .k_means_constrained_ import KMeansConstrained
File "/home/sconstable/local-dev/venv/lib/python3.10/site-packages/k_means_constrained/k_means_constrained_.py", line 18, in <module>
from .sklearn_import.metrics.pairwise import euclidean_distances
File "/home/sconstable/local-dev/venv/lib/python3.10/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 26, in init k_means_constrained.sklearn_import.metrics.pairwise_fast
File "__init__.pxd", line 944, in numpy.import_array
ImportError: numpy.core.multiarray failed to import
from ubuntu:20.04
RUN apt-get update && apt-get install -y python3-pip
RUN pip3 install numpy==1.22.4 k-means-constrained
RUN python3 -c 'import k_means_constrained'