giotto-ai / giotto-tda

A high-performance topological machine learning toolbox in Python

Home Page:https://giotto-ai.github.io/gtda-docs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot install Giotto with pip on MAC OS

n-otter opened this issue · comments

Cannot install Giotto with pip

I am trying to install Giotto on a MAC OS 12.5, with pip 22.2.2, and Cmake 3.24.0, but there seems to be issues with building wheels, as well as with CMake. Running the following in the terminal
pip3 install Giotto-learn
gives the following error message:

DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Collecting giotto-learn
  Using cached giotto-learn-0.1.3.post1.tar.gz (59 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy>=1.17.0 in /opt/homebrew/lib/python3.9/site-packages (from giotto-learn) (1.22.3)
Requirement already satisfied: scipy>=0.17.0 in /opt/homebrew/lib/python3.9/site-packages (from giotto-learn) (1.9.0)
Requirement already satisfied: scikit-learn>=0.21.3 in /opt/homebrew/lib/python3.9/site-packages (from giotto-learn) (1.1.2)
Requirement already satisfied: joblib>=0.11 in /opt/homebrew/lib/python3.9/site-packages (from giotto-learn) (1.1.0)
Requirement already satisfied: threadpoolctl>=2.0.0 in /opt/homebrew/lib/python3.9/site-packages (from scikit-learn>=0.21.3->giotto-learn) (3.1.0)
Building wheels for collected packages: giotto-learn
  Building wheel for giotto-learn (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [116 lines of output]
      /opt/homebrew/lib/python3.9/site-packages/setuptools/dist.py:723: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
        warnings.warn(
      /opt/homebrew/lib/python3.9/site-packages/setuptools/dist.py:493: UserWarning: Normalizing '0.1.3-r1' to '0.1.3.post1'
        warnings.warn(tmpl.format(**locals()))
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-11-arm64-3.9
      creating build/lib.macosx-11-arm64-3.9/giotto
      copying giotto/_version.py -> build/lib.macosx-11-arm64-3.9/giotto
      copying giotto/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto
      copying giotto/pipeline.py -> build/lib.macosx-11-arm64-3.9/giotto
      copying giotto/base.py -> build/lib.macosx-11-arm64-3.9/giotto
      creating build/lib.macosx-11-arm64-3.9/giotto/diagrams
      copying giotto/diagrams/_metrics.py -> build/lib.macosx-11-arm64-3.9/giotto/diagrams
      copying giotto/diagrams/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/diagrams
      copying giotto/diagrams/features.py -> build/lib.macosx-11-arm64-3.9/giotto/diagrams
      copying giotto/diagrams/distance.py -> build/lib.macosx-11-arm64-3.9/giotto/diagrams
      copying giotto/diagrams/preprocessing.py -> build/lib.macosx-11-arm64-3.9/giotto/diagrams
      copying giotto/diagrams/_utils.py -> build/lib.macosx-11-arm64-3.9/giotto/diagrams
      creating build/lib.macosx-11-arm64-3.9/giotto/externals
      copying giotto/externals/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/externals
      creating build/lib.macosx-11-arm64-3.9/giotto/tests
      copying giotto/tests/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/tests
      copying giotto/tests/test_pipeline.py -> build/lib.macosx-11-arm64-3.9/giotto/tests
      creating build/lib.macosx-11-arm64-3.9/giotto/utils
      copying giotto/utils/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/utils
      copying giotto/utils/testing.py -> build/lib.macosx-11-arm64-3.9/giotto/utils
      copying giotto/utils/validation.py -> build/lib.macosx-11-arm64-3.9/giotto/utils
      creating build/lib.macosx-11-arm64-3.9/giotto/time_series
      copying giotto/time_series/embedding.py -> build/lib.macosx-11-arm64-3.9/giotto/time_series
      copying giotto/time_series/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/time_series
      copying giotto/time_series/features.py -> build/lib.macosx-11-arm64-3.9/giotto/time_series
      copying giotto/time_series/preprocessing.py -> build/lib.macosx-11-arm64-3.9/giotto/time_series
      copying giotto/time_series/multivariate.py -> build/lib.macosx-11-arm64-3.9/giotto/time_series
      copying giotto/time_series/target.py -> build/lib.macosx-11-arm64-3.9/giotto/time_series
      creating build/lib.macosx-11-arm64-3.9/giotto/meta_transformers
      copying giotto/meta_transformers/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/meta_transformers
      copying giotto/meta_transformers/features.py -> build/lib.macosx-11-arm64-3.9/giotto/meta_transformers
      creating build/lib.macosx-11-arm64-3.9/giotto/graphs
      copying giotto/graphs/geodesic_distance.py -> build/lib.macosx-11-arm64-3.9/giotto/graphs
      copying giotto/graphs/transition.py -> build/lib.macosx-11-arm64-3.9/giotto/graphs
      copying giotto/graphs/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/graphs
      copying giotto/graphs/kneighbors.py -> build/lib.macosx-11-arm64-3.9/giotto/graphs
      creating build/lib.macosx-11-arm64-3.9/giotto/homology
      copying giotto/homology/point_clouds.py -> build/lib.macosx-11-arm64-3.9/giotto/homology
      copying giotto/homology/consistent.py -> build/lib.macosx-11-arm64-3.9/giotto/homology
      copying giotto/homology/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/homology
      copying giotto/homology/_utils.py -> build/lib.macosx-11-arm64-3.9/giotto/homology
      creating build/lib.macosx-11-arm64-3.9/giotto/diagrams/tests
      copying giotto/diagrams/tests/test_features.py -> build/lib.macosx-11-arm64-3.9/giotto/diagrams/tests
      copying giotto/diagrams/tests/test_distance.py -> build/lib.macosx-11-arm64-3.9/giotto/diagrams/tests
      copying giotto/diagrams/tests/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/diagrams/tests
      copying giotto/diagrams/tests/test_preprocessing.py -> build/lib.macosx-11-arm64-3.9/giotto/diagrams/tests
      creating build/lib.macosx-11-arm64-3.9/giotto/externals/python
      copying giotto/externals/python/cubical_complex_interface.py -> build/lib.macosx-11-arm64-3.9/giotto/externals/python
      copying giotto/externals/python/simplex_tree_interface.py -> build/lib.macosx-11-arm64-3.9/giotto/externals/python
      copying giotto/externals/python/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/externals/python
      copying giotto/externals/python/ripser_interface.py -> build/lib.macosx-11-arm64-3.9/giotto/externals/python
      creating build/lib.macosx-11-arm64-3.9/giotto/utils/tests
      copying giotto/utils/tests/test_validation.py -> build/lib.macosx-11-arm64-3.9/giotto/utils/tests
      copying giotto/utils/tests/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/utils/tests
      creating build/lib.macosx-11-arm64-3.9/giotto/time_series/tests
      copying giotto/time_series/tests/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/time_series/tests
      copying giotto/time_series/tests/test_multivariate.py -> build/lib.macosx-11-arm64-3.9/giotto/time_series/tests
      copying giotto/time_series/tests/test_embedding.py -> build/lib.macosx-11-arm64-3.9/giotto/time_series/tests
      copying giotto/time_series/tests/test_preprocessing.py -> build/lib.macosx-11-arm64-3.9/giotto/time_series/tests
      creating build/lib.macosx-11-arm64-3.9/giotto/meta_transformers/tests
      copying giotto/meta_transformers/tests/test_features.py -> build/lib.macosx-11-arm64-3.9/giotto/meta_transformers/tests
      copying giotto/meta_transformers/tests/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/meta_transformers/tests
      creating build/lib.macosx-11-arm64-3.9/giotto/graphs/tests
      copying giotto/graphs/tests/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/graphs/tests
      copying giotto/graphs/tests/test_transition.py -> build/lib.macosx-11-arm64-3.9/giotto/graphs/tests
      copying giotto/graphs/tests/test_geodesic_distance.py -> build/lib.macosx-11-arm64-3.9/giotto/graphs/tests
      copying giotto/graphs/tests/test_kneighbors.py -> build/lib.macosx-11-arm64-3.9/giotto/graphs/tests
      creating build/lib.macosx-11-arm64-3.9/giotto/homology/tests
      copying giotto/homology/tests/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/homology/tests
      copying giotto/homology/tests/test_consistent.py -> build/lib.macosx-11-arm64-3.9/giotto/homology/tests
      copying giotto/homology/tests/test_point_clouds.py -> build/lib.macosx-11-arm64-3.9/giotto/homology/tests
      running build_ext
      xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/n6/fpwh5mls3cj0cgrv_v9vxvbm0000gp/T/pip-install-dmb9d4h4/giotto-learn_a4adf9fd14f243728ca433fa45afc45e/setup.py", line 159, in <module>
          setup(name=DISTNAME,
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/__init__.py", line 155, in setup
          return distutils.core.setup(**attrs)
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 148, in setup
          return run_commands(dist)
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
          dist.run_commands()
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
          self.run_command(cmd)
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
          cmd_obj.run()
        File "/opt/homebrew/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 299, in run
          self.run_command('build')
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
          cmd_obj.run()
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 135, in run
          self.run_command(cmd_name)
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
          cmd_obj.run()
        File "/private/var/folders/n6/fpwh5mls3cj0cgrv_v9vxvbm0000gp/T/pip-install-dmb9d4h4/giotto-learn_a4adf9fd14f243728ca433fa45afc45e/setup.py", line 92, in run
          self.install_dependencies()
        File "/private/var/folders/n6/fpwh5mls3cj0cgrv_v9vxvbm0000gp/T/pip-install-dmb9d4h4/giotto-learn_a4adf9fd14f243728ca433fa45afc45e/setup.py", line 104, in install_dependencies
          subprocess.check_call(['git', 'clone',
        File "/opt/homebrew/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['git', 'clone', 'https://github.com/pybind/pybind11.git', '/private/var/folders/n6/fpwh5mls3cj0cgrv_v9vxvbm0000gp/T/pip-install-dmb9d4h4/giotto-learn_a4adf9fd14f243728ca433fa45afc45e/giotto/externals/pybind11']' returned non-zero exit status 1.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for giotto-learn
  Running setup.py clean for giotto-learn
Failed to build giotto-learn
Installing collected packages: giotto-learn
  DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
  Running setup.py install for giotto-learn ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for giotto-learn did not run successfully.
  │ exit code: 1
  ╰─> [127 lines of output]
      /opt/homebrew/lib/python3.9/site-packages/setuptools/dist.py:723: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
        warnings.warn(
      /opt/homebrew/lib/python3.9/site-packages/setuptools/dist.py:493: UserWarning: Normalizing '0.1.3-r1' to '0.1.3.post1'
        warnings.warn(tmpl.format(**locals()))
      running install
      /opt/homebrew/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.macosx-11-arm64-3.9
      creating build/lib.macosx-11-arm64-3.9/giotto
      copying giotto/_version.py -> build/lib.macosx-11-arm64-3.9/giotto
      copying giotto/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto
      copying giotto/pipeline.py -> build/lib.macosx-11-arm64-3.9/giotto
      copying giotto/base.py -> build/lib.macosx-11-arm64-3.9/giotto
      creating build/lib.macosx-11-arm64-3.9/giotto/diagrams
      copying giotto/diagrams/_metrics.py -> build/lib.macosx-11-arm64-3.9/giotto/diagrams
      copying giotto/diagrams/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/diagrams
      copying giotto/diagrams/features.py -> build/lib.macosx-11-arm64-3.9/giotto/diagrams
      copying giotto/diagrams/distance.py -> build/lib.macosx-11-arm64-3.9/giotto/diagrams
      copying giotto/diagrams/preprocessing.py -> build/lib.macosx-11-arm64-3.9/giotto/diagrams
      copying giotto/diagrams/_utils.py -> build/lib.macosx-11-arm64-3.9/giotto/diagrams
      creating build/lib.macosx-11-arm64-3.9/giotto/externals
      copying giotto/externals/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/externals
      creating build/lib.macosx-11-arm64-3.9/giotto/tests
      copying giotto/tests/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/tests
      copying giotto/tests/test_pipeline.py -> build/lib.macosx-11-arm64-3.9/giotto/tests
      creating build/lib.macosx-11-arm64-3.9/giotto/utils
      copying giotto/utils/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/utils
      copying giotto/utils/testing.py -> build/lib.macosx-11-arm64-3.9/giotto/utils
      copying giotto/utils/validation.py -> build/lib.macosx-11-arm64-3.9/giotto/utils
      creating build/lib.macosx-11-arm64-3.9/giotto/time_series
      copying giotto/time_series/embedding.py -> build/lib.macosx-11-arm64-3.9/giotto/time_series
      copying giotto/time_series/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/time_series
      copying giotto/time_series/features.py -> build/lib.macosx-11-arm64-3.9/giotto/time_series
      copying giotto/time_series/preprocessing.py -> build/lib.macosx-11-arm64-3.9/giotto/time_series
      copying giotto/time_series/multivariate.py -> build/lib.macosx-11-arm64-3.9/giotto/time_series
      copying giotto/time_series/target.py -> build/lib.macosx-11-arm64-3.9/giotto/time_series
      creating build/lib.macosx-11-arm64-3.9/giotto/meta_transformers
      copying giotto/meta_transformers/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/meta_transformers
      copying giotto/meta_transformers/features.py -> build/lib.macosx-11-arm64-3.9/giotto/meta_transformers
      creating build/lib.macosx-11-arm64-3.9/giotto/graphs
      copying giotto/graphs/geodesic_distance.py -> build/lib.macosx-11-arm64-3.9/giotto/graphs
      copying giotto/graphs/transition.py -> build/lib.macosx-11-arm64-3.9/giotto/graphs
      copying giotto/graphs/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/graphs
      copying giotto/graphs/kneighbors.py -> build/lib.macosx-11-arm64-3.9/giotto/graphs
      creating build/lib.macosx-11-arm64-3.9/giotto/homology
      copying giotto/homology/point_clouds.py -> build/lib.macosx-11-arm64-3.9/giotto/homology
      copying giotto/homology/consistent.py -> build/lib.macosx-11-arm64-3.9/giotto/homology
      copying giotto/homology/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/homology
      copying giotto/homology/_utils.py -> build/lib.macosx-11-arm64-3.9/giotto/homology
      creating build/lib.macosx-11-arm64-3.9/giotto/diagrams/tests
      copying giotto/diagrams/tests/test_features.py -> build/lib.macosx-11-arm64-3.9/giotto/diagrams/tests
      copying giotto/diagrams/tests/test_distance.py -> build/lib.macosx-11-arm64-3.9/giotto/diagrams/tests
      copying giotto/diagrams/tests/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/diagrams/tests
      copying giotto/diagrams/tests/test_preprocessing.py -> build/lib.macosx-11-arm64-3.9/giotto/diagrams/tests
      creating build/lib.macosx-11-arm64-3.9/giotto/externals/python
      copying giotto/externals/python/cubical_complex_interface.py -> build/lib.macosx-11-arm64-3.9/giotto/externals/python
      copying giotto/externals/python/simplex_tree_interface.py -> build/lib.macosx-11-arm64-3.9/giotto/externals/python
      copying giotto/externals/python/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/externals/python
      copying giotto/externals/python/ripser_interface.py -> build/lib.macosx-11-arm64-3.9/giotto/externals/python
      creating build/lib.macosx-11-arm64-3.9/giotto/utils/tests
      copying giotto/utils/tests/test_validation.py -> build/lib.macosx-11-arm64-3.9/giotto/utils/tests
      copying giotto/utils/tests/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/utils/tests
      creating build/lib.macosx-11-arm64-3.9/giotto/time_series/tests
      copying giotto/time_series/tests/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/time_series/tests
      copying giotto/time_series/tests/test_multivariate.py -> build/lib.macosx-11-arm64-3.9/giotto/time_series/tests
      copying giotto/time_series/tests/test_embedding.py -> build/lib.macosx-11-arm64-3.9/giotto/time_series/tests
      copying giotto/time_series/tests/test_preprocessing.py -> build/lib.macosx-11-arm64-3.9/giotto/time_series/tests
      creating build/lib.macosx-11-arm64-3.9/giotto/meta_transformers/tests
      copying giotto/meta_transformers/tests/test_features.py -> build/lib.macosx-11-arm64-3.9/giotto/meta_transformers/tests
      copying giotto/meta_transformers/tests/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/meta_transformers/tests
      creating build/lib.macosx-11-arm64-3.9/giotto/graphs/tests
      copying giotto/graphs/tests/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/graphs/tests
      copying giotto/graphs/tests/test_transition.py -> build/lib.macosx-11-arm64-3.9/giotto/graphs/tests
      copying giotto/graphs/tests/test_geodesic_distance.py -> build/lib.macosx-11-arm64-3.9/giotto/graphs/tests
      copying giotto/graphs/tests/test_kneighbors.py -> build/lib.macosx-11-arm64-3.9/giotto/graphs/tests
      creating build/lib.macosx-11-arm64-3.9/giotto/homology/tests
      copying giotto/homology/tests/__init__.py -> build/lib.macosx-11-arm64-3.9/giotto/homology/tests
      copying giotto/homology/tests/test_consistent.py -> build/lib.macosx-11-arm64-3.9/giotto/homology/tests
      copying giotto/homology/tests/test_point_clouds.py -> build/lib.macosx-11-arm64-3.9/giotto/homology/tests
      running build_ext
      CMake Warning:
        Ignoring extra path from command line:
      
         "/private/var/folders/n6/fpwh5mls3cj0cgrv_v9vxvbm0000gp/T/pip-install-dmb9d4h4/giotto-learn_a4adf9fd14f243728ca433fa45afc45e"
      
      
      CMake Error: The source directory "/private/var/folders/n6/fpwh5mls3cj0cgrv_v9vxvbm0000gp/T/pip-install-dmb9d4h4/giotto-learn_a4adf9fd14f243728ca433fa45afc45e" does not appear to contain CMakeLists.txt.
      Specify --help for usage, or press the help button on the CMake GUI.
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/n6/fpwh5mls3cj0cgrv_v9vxvbm0000gp/T/pip-install-dmb9d4h4/giotto-learn_a4adf9fd14f243728ca433fa45afc45e/setup.py", line 159, in <module>
          setup(name=DISTNAME,
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/__init__.py", line 155, in setup
          return distutils.core.setup(**attrs)
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 148, in setup
          return run_commands(dist)
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
          dist.run_commands()
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
          self.run_command(cmd)
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
          cmd_obj.run()
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/command/install.py", line 68, in run
          return orig.install.run(self)
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_distutils/command/install.py", line 664, in run
          self.run_command('build')
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
          cmd_obj.run()
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 135, in run
          self.run_command(cmd_name)
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
          cmd_obj.run()
        File "/private/var/folders/n6/fpwh5mls3cj0cgrv_v9vxvbm0000gp/T/pip-install-dmb9d4h4/giotto-learn_a4adf9fd14f243728ca433fa45afc45e/setup.py", line 95, in run
          self.build_extension(ext)
        File "/private/var/folders/n6/fpwh5mls3cj0cgrv_v9vxvbm0000gp/T/pip-install-dmb9d4h4/giotto-learn_a4adf9fd14f243728ca433fa45afc45e/setup.py", line 153, in build_extension
          subprocess.check_call(['cmake', ext.sourcedir] + cmake_args,
        File "/opt/homebrew/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/n6/fpwh5mls3cj0cgrv_v9vxvbm0000gp/T/pip-install-dmb9d4h4/giotto-learn_a4adf9fd14f243728ca433fa45afc45e', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/n6/fpwh5mls3cj0cgrv_v9vxvbm0000gp/T/pip-install-dmb9d4h4/giotto-learn_a4adf9fd14f243728ca433fa45afc45e/build/lib.macosx-11-arm64-3.9', '-DPYTHON_EXECUTABLE=/opt/homebrew/opt/python@3.9/bin/python3.9', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> giotto-learn

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Hi @n-otter! I'm honoured to see you here :)

If you are on a Mac with Apple Silicon, this is simply because as of right now there are still no available wheels on PyPI for these systems. We are (as we speak) working on shipping them! In fact, we need to first release wheels for the giotto-ph and pyflagser projects as they are dependencies of giotto-tda. giotto-ph is essentially done, though not yet on PyPI -- you can find the compiled wheels at the bottom of https://github.com/giotto-ai/giotto-ph/actions/runs/2857044679 for the time being.

For now, your pip is trying to fall back to a tarball installation that is doomed to fail, see #308. Instead, for now, I would recommend doing the following things:

  1. Set your system up as would be required for a giotto-tda installation from sources, see https://giotto-ai.github.io/gtda-docs/0.5.1/installation.html#developer-installation (don't try to install giotto-tda yet at this point).
  2. Install giotto-ph either from sources (python -m pip install -e . from the root of a clone of the repo) or from the compiled wheels linked above.
  3. Install pyflagser from sources.
  4. Install giotto-tda from sources.

For the record, I am developing the library on a system with Apple Silicon these days, so am able to confirm that it works there.

Linking to #617 just for book-keeping.

Thanks for much for the quick response! It worked like a charm.

Thanks @n-otter! Btw, the Apple Silicon wheels for giotto-ph are now on PyPI. pyflagser soon to follow. But if you installed both from sources in the last couple of days, you're possibly even better off in terms of performance.