tslearnを使用できるようにしたい
最近,pythonでkShapeによるクラスタリングをしたいと思い,ターミナル上でtslearnをインストールしようとしたのですが,以下のようなエラー文が表示されました.
何が原因かわかりません.
どなたかご教授いただけますと幸いです.
Building wheels for collected packages: tslearn Building wheel for tslearn (PEP 517) ... error ERROR: Command errored out with exit status 1: command: /usr/local/opt/python@3.9/bin/python3.9 /usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /var/folders/s8/kl7xtlk11dl94wg8wj3gjbbr0000gn/T/tmprfdn9co7 cwd: /private/var/folders/s8/kl7xtlk11dl94wg8wj3gjbbr0000gn/T/pip-install-384240s3/tslearn_64344a8a487b4eba9671f849e381d7ab Complete output (98 lines): /usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/dist.py:697: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead warnings.warn( running bdist_wheel running build running build_py creating build creating build/lib.macosx-11-x86_64-3.9 creating build/lib.macosx-11-x86_64-3.9/tslearn copying tslearn/__init__.py -> build/lib.macosx-11-x86_64-3.9/tslearn creating build/lib.macosx-11-x86_64-3.9/tslearn/metrics copying tslearn/metrics/softdtw_variants.py -> build/lib.macosx-11-x86_64-3.9/tslearn/metrics copying tslearn/metrics/dtw_variants.py -> build/lib.macosx-11-x86_64-3.9/tslearn/metrics copying tslearn/metrics/sax.py -> build/lib.macosx-11-x86_64-3.9/tslearn/metrics copying tslearn/metrics/__init__.py -> build/lib.macosx-11-x86_64-3.9/tslearn/metrics copying tslearn/metrics/utils.py -> build/lib.macosx-11-x86_64-3.9/tslearn/metrics copying tslearn/metrics/ctw.py -> build/lib.macosx-11-x86_64-3.9/tslearn/metrics creating build/lib.macosx-11-x86_64-3.9/tslearn/piecewise copying tslearn/piecewise/__init__.py -> build/lib.macosx-11-x86_64-3.9/tslearn/piecewise copying tslearn/piecewise/piecewise.py -> build/lib.macosx-11-x86_64-3.9/tslearn/piecewise creating build/lib.macosx-11-x86_64-3.9/tslearn/barycenters copying tslearn/barycenters/softdtw.py -> build/lib.macosx-11-x86_64-3.9/tslearn/barycenters copying tslearn/barycenters/__init__.py -> build/lib.macosx-11-x86_64-3.9/tslearn/barycenters copying tslearn/barycenters/dba.py -> build/lib.macosx-11-x86_64-3.9/tslearn/barycenters copying tslearn/barycenters/utils.py -> build/lib.macosx-11-x86_64-3.9/tslearn/barycenters copying tslearn/barycenters/euclidean.py -> build/lib.macosx-11-x86_64-3.9/tslearn/barycenters creating build/lib.macosx-11-x86_64-3.9/tslearn/datasets copying tslearn/datasets/datasets.py -> build/lib.macosx-11-x86_64-3.9/tslearn/datasets copying tslearn/datasets/__init__.py -> build/lib.macosx-11-x86_64-3.9/tslearn/datasets copying tslearn/datasets/cached.py -> build/lib.macosx-11-x86_64-3.9/tslearn/datasets copying tslearn/datasets/ucr_uea.py -> build/lib.macosx-11-x86_64-3.9/tslearn/datasets creating build/lib.macosx-11-x86_64-3.9/tslearn/tests copying tslearn/tests/test_utils.py -> build/lib.macosx-11-x86_64-3.9/tslearn/tests copying tslearn/tests/test_estimators.py -> build/lib.macosx-11-x86_64-3.9/tslearn/tests copying tslearn/tests/test_matrixprofile.py -> build/lib.macosx-11-x86_64-3.9/tslearn/tests copying tslearn/tests/test_metrics.py -> build/lib.macosx-11-x86_64-3.9/tslearn/tests copying tslearn/tests/test_barycenters.py -> build/lib.macosx-11-x86_64-3.9/tslearn/tests copying tslearn/tests/__init__.py -> build/lib.macosx-11-x86_64-3.9/tslearn/tests copying tslearn/tests/test_piecewise.py -> build/lib.macosx-11-x86_64-3.9/tslearn/tests copying tslearn/tests/test_variablelength.py -> build/lib.macosx-11-x86_64-3.9/tslearn/tests copying tslearn/tests/test_preprocessing.py -> build/lib.macosx-11-x86_64-3.9/tslearn/tests copying tslearn/tests/test_svm.py -> build/lib.macosx-11-x86_64-3.9/tslearn/tests copying tslearn/tests/test_serialize_models.py -> build/lib.macosx-11-x86_64-3.9/tslearn/tests copying tslearn/tests/sklearn_patches.py -> build/lib.macosx-11-x86_64-3.9/tslearn/tests copying tslearn/tests/test_shapelets.py -> build/lib.macosx-11-x86_64-3.9/tslearn/tests copying tslearn/tests/test_neighbors.py -> build/lib.macosx-11-x86_64-3.9/tslearn/tests copying tslearn/tests/test_clustering.py -> build/lib.macosx-11-x86_64-3.9/tslearn/tests creating build/lib.macosx-11-x86_64-3.9/tslearn/clustering copying tslearn/clustering/kshape.py -> build/lib.macosx-11-x86_64-3.9/tslearn/clustering copying tslearn/clustering/__init__.py -> build/lib.macosx-11-x86_64-3.9/tslearn/clustering copying tslearn/clustering/kmeans.py -> build/lib.macosx-11-x86_64-3.9/tslearn/clustering copying tslearn/clustering/utils.py -> build/lib.macosx-11-x86_64-3.9/tslearn/clustering creating build/lib.macosx-11-x86_64-3.9/tslearn/hdftools copying tslearn/hdftools/hdftools.py -> build/lib.macosx-11-x86_64-3.9/tslearn/hdftools copying tslearn/hdftools/__init__.py -> build/lib.macosx-11-x86_64-3.9/tslearn/hdftools creating build/lib.macosx-11-x86_64-3.9/tslearn/bases copying tslearn/bases/__init__.py -> build/lib.macosx-11-x86_64-3.9/tslearn/bases copying tslearn/bases/bases.py -> build/lib.macosx-11-x86_64-3.9/tslearn/bases creating build/lib.macosx-11-x86_64-3.9/tslearn/early_classification copying tslearn/early_classification/__init__.py -> build/lib.macosx-11-x86_64-3.9/tslearn/early_classification copying tslearn/early_classification/early_classification.py -> build/lib.macosx-11-x86_64-3.9/tslearn/early_classification creating build/lib.macosx-11-x86_64-3.9/tslearn/utils copying tslearn/utils/cast.py -> build/lib.macosx-11-x86_64-3.9/tslearn/utils copying tslearn/utils/__init__.py -> build/lib.macosx-11-x86_64-3.9/tslearn/utils copying tslearn/utils/utils.py -> build/lib.macosx-11-x86_64-3.9/tslearn/utils creating build/lib.macosx-11-x86_64-3.9/tslearn/neural_network copying tslearn/neural_network/__init__.py -> build/lib.macosx-11-x86_64-3.9/tslearn/neural_network copying tslearn/neural_network/neural_network.py -> build/lib.macosx-11-x86_64-3.9/tslearn/neural_network creating build/lib.macosx-11-x86_64-3.9/tslearn/shapelets copying tslearn/shapelets/__init__.py -> build/lib.macosx-11-x86_64-3.9/tslearn/shapelets copying tslearn/shapelets/shapelets.py -> build/lib.macosx-11-x86_64-3.9/tslearn/shapelets creating build/lib.macosx-11-x86_64-3.9/tslearn/svm copying tslearn/svm/__init__.py -> build/lib.macosx-11-x86_64-3.9/tslearn/svm copying tslearn/svm/svm.py -> build/lib.macosx-11-x86_64-3.9/tslearn/svm creating build/lib.macosx-11-x86_64-3.9/tslearn/matrix_profile copying tslearn/matrix_profile/__init__.py -> build/lib.macosx-11-x86_64-3.9/tslearn/matrix_profile copying tslearn/matrix_profile/matrix_profile.py -> build/lib.macosx-11-x86_64-3.9/tslearn/matrix_profile creating build/lib.macosx-11-x86_64-3.9/tslearn/preprocessing copying tslearn/preprocessing/__init__.py -> build/lib.macosx-11-x86_64-3.9/tslearn/preprocessing copying tslearn/preprocessing/preprocessing.py -> build/lib.macosx-11-x86_64-3.9/tslearn/preprocessing creating build/lib.macosx-11-x86_64-3.9/tslearn/generators copying tslearn/generators/__init__.py -> build/lib.macosx-11-x86_64-3.9/tslearn/generators copying tslearn/generators/generators.py -> build/lib.macosx-11-x86_64-3.9/tslearn/generators creating build/lib.macosx-11-x86_64-3.9/tslearn/neighbors copying tslearn/neighbors/neighbors.py -> build/lib.macosx-11-x86_64-3.9/tslearn/neighbors copying tslearn/neighbors/__init__.py -> build/lib.macosx-11-x86_64-3.9/tslearn/neighbors creating build/lib.macosx-11-x86_64-3.9/tslearn/.cached_datasets copying tslearn/.cached_datasets/Trace.npz -> build/lib.macosx-11-x86_64-3.9/tslearn/.cached_datasets running build_ext building 'tslearn.metrics.cycc' extension creating build/temp.macosx-11-x86_64-3.9 creating build/temp.macosx-11-x86_64-3.9/tslearn creating build/temp.macosx-11-x86_64-3.9/tslearn/metrics clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c tslearn/metrics/cycc.c -o build/temp.macosx-11-x86_64-3.9/tslearn/metrics/cycc.o tslearn/metrics/cycc.c:633:10: fatal error: 'numpy/arrayobject.h' file not found #include "numpy/arrayobject.h" ^~~~~~~~~~~~~~~~~~~~~ 1 error generated. error: command '/usr/bin/clang' failed with exit code 1 ---------------------------------------- ERROR: Failed building wheel for tslearn Failed to build tslearn ERROR: Could not build wheels for tslearn which use PEP 517 and cannot be installed directly
これが参考になるかも
https://github.com/tslearn-team/tslearn/issues/196