giotto-ai / giotto-tda

A high-performance topological machine learning toolbox in Python
https://giotto-ai.github.io/gtda-docs
Other
858 stars 175 forks source link

[BUG] Installing giotto-tda error #674

Closed mubagriyanik closed 5 months ago

mubagriyanik commented 1 year ago

Hello,

I am trying to install giotto tda by using this code provided on the website:

pip install giotto-tda

I use comda environment and when I ran this code on the conda environment this is the code line and error I am getting:

` Building wheels for collected packages: giotto-tda Building wheel for giotto-tda (setup.py) ... /Password: error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [239 lines of output] /Users/mbagriyanik/mambaforge/envs/ufl23/lib/python3.11/site-packages/setuptools/dist.py:745: SetuptoolsDeprecationWarning: Invalid dash-separated options

    opt = self.warn_dash_deprecation(opt, section)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-11.0-arm64-cpython-311
  creating build/lib.macosx-11.0-arm64-cpython-311/gtda
  copying gtda/_version.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda
  copying gtda/__init__.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda
  copying gtda/pipeline.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda
  copying gtda/base.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda
  creating build/lib.macosx-11.0-arm64-cpython-311/gtda/diagrams
  copying gtda/diagrams/_metrics.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/diagrams
  copying gtda/diagrams/__init__.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/diagrams
  copying gtda/diagrams/features.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/diagrams
  copying gtda/diagrams/distance.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/diagrams
  copying gtda/diagrams/preprocessing.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/diagrams
  copying gtda/diagrams/_utils.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/diagrams
  creating build/lib.macosx-11.0-arm64-cpython-311/gtda/externals
  copying gtda/externals/__init__.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/externals
  creating build/lib.macosx-11.0-arm64-cpython-311/gtda/tests
  copying gtda/tests/__init__.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/tests
  copying gtda/tests/test_pipeline.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/tests
  creating build/lib.macosx-11.0-arm64-cpython-311/gtda/mapper
  copying gtda/mapper/cover.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/mapper
  copying gtda/mapper/__init__.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/mapper
  copying gtda/mapper/visualization.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/mapper
  copying gtda/mapper/nerve.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/mapper
  copying gtda/mapper/cluster.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/mapper
  copying gtda/mapper/pipeline.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/mapper
  copying gtda/mapper/filter.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/mapper
  creating build/lib.macosx-11.0-arm64-cpython-311/gtda/utils
  copying gtda/utils/__init__.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/utils
  copying gtda/utils/_docs.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/utils
  copying gtda/utils/testing.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/utils
  copying gtda/utils/validation.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/utils
  creating build/lib.macosx-11.0-arm64-cpython-311/gtda/time_series
  copying gtda/time_series/embedding.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/time_series
  copying gtda/time_series/__init__.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/time_series
  copying gtda/time_series/features.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/time_series
  copying gtda/time_series/preprocessing.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/time_series
  copying gtda/time_series/multivariate.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/time_series
  copying gtda/time_series/target.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/time_series
  creating build/lib.macosx-11.0-arm64-cpython-311/gtda/meta_transformers
  copying gtda/meta_transformers/__init__.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/meta_transformers
  copying gtda/meta_transformers/features.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/meta_transformers
  creating build/lib.macosx-11.0-arm64-cpython-311/gtda/graphs
  copying gtda/graphs/geodesic_distance.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/graphs
  copying gtda/graphs/transition.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/graphs
  copying gtda/graphs/__init__.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/graphs
  copying gtda/graphs/kneighbors.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/graphs
  creating build/lib.macosx-11.0-arm64-cpython-311/gtda/homology
  copying gtda/homology/point_clouds.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/homology
  copying gtda/homology/consistent.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/homology
  copying gtda/homology/__init__.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/homology
  copying gtda/homology/_utils.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/homology
  creating build/lib.macosx-11.0-arm64-cpython-311/gtda/diagrams/tests
  copying gtda/diagrams/tests/test_features.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/diagrams/tests
  copying gtda/diagrams/tests/test_distance.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/diagrams/tests
  copying gtda/diagrams/tests/__init__.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/diagrams/tests
  copying gtda/diagrams/tests/test_preprocessing.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/diagrams/tests
  creating build/lib.macosx-11.0-arm64-cpython-311/gtda/externals/python
  copying gtda/externals/python/cubical_complex_interface.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/externals/python
  copying gtda/externals/python/simplex_tree_interface.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/externals/python
  copying gtda/externals/python/strong_witness_complex_interface.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/externals/python
  copying gtda/externals/python/__init__.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/externals/python
  copying gtda/externals/python/periodic_cubical_complex_interface.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/externals/python
  copying gtda/externals/python/witness_complex_interface.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/externals/python
  copying gtda/externals/python/rips_complex_interface.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/externals/python
  copying gtda/externals/python/ripser_interface.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/externals/python
  copying gtda/externals/python/cech_complex_interface.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/externals/python
  creating build/lib.macosx-11.0-arm64-cpython-311/gtda/externals/python/tests
  copying gtda/externals/python/tests/__init__.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/externals/python/tests
  copying gtda/externals/python/tests/test_witness.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/externals/python/tests
  copying gtda/externals/python/tests/test_rips_complex.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/externals/python/tests
  copying gtda/externals/python/tests/test_cech_complex.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/externals/python/tests
  copying gtda/externals/python/tests/test_periodic_cubical_complex.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/externals/python/tests
  creating build/lib.macosx-11.0-arm64-cpython-311/gtda/mapper/utils
  copying gtda/mapper/utils/_logging.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/mapper/utils
  copying gtda/mapper/utils/__init__.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/mapper/utils
  copying gtda/mapper/utils/_cover.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/mapper/utils
  copying gtda/mapper/utils/visualization.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/mapper/utils
  copying gtda/mapper/utils/_cluster.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/mapper/utils
  copying gtda/mapper/utils/pipeline.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/mapper/utils
  copying gtda/mapper/utils/_list_feature_union.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/mapper/utils
  copying gtda/mapper/utils/decorators.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/mapper/utils
  creating build/lib.macosx-11.0-arm64-cpython-311/gtda/utils/tests
  copying gtda/utils/tests/test_validation.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/utils/tests
  copying gtda/utils/tests/__init__.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/utils/tests
  creating build/lib.macosx-11.0-arm64-cpython-311/gtda/time_series/tests
  copying gtda/time_series/tests/__init__.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/time_series/tests
  copying gtda/time_series/tests/test_multivariate.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/time_series/tests
  copying gtda/time_series/tests/test_embedding.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/time_series/tests
  copying gtda/time_series/tests/test_preprocessing.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/time_series/tests
  creating build/lib.macosx-11.0-arm64-cpython-311/gtda/meta_transformers/tests
  copying gtda/meta_transformers/tests/test_features.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/meta_transformers/tests
  copying gtda/meta_transformers/tests/__init__.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/meta_transformers/tests
  creating build/lib.macosx-11.0-arm64-cpython-311/gtda/graphs/tests
  copying gtda/graphs/tests/__init__.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/graphs/tests
  copying gtda/graphs/tests/test_transition.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/graphs/tests
  copying gtda/graphs/tests/test_geodesic_distance.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/graphs/tests
  copying gtda/graphs/tests/test_kneighbors.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/graphs/tests
  creating build/lib.macosx-11.0-arm64-cpython-311/gtda/homology/tests
  copying gtda/homology/tests/__init__.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/homology/tests
  copying gtda/homology/tests/test_consistent.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/homology/tests
  copying gtda/homology/tests/test_point_clouds.py -> build/lib.macosx-11.0-arm64-cpython-311/gtda/homology/tests
  running build_ext
  Cloning into '/private/var/folders/lq/dh7kcps136n72nc_dhrly7nw0000gn/T/pip-install-wli41gqr/giotto-tda_6d92762b595147ea966f0f4868362d77/gtda/externals/pybind11'...
  -- The CXX compiler identification is Clang 16.0.0
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /Users/mbagriyanik/mambaforge/envs/ufl23/bin/arm64-apple-darwin20.0.0-clang++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- pybind11 v2.11.0 dev1
  -- CMake 3.26.1
  -- Found PythonInterp: /Users/mbagriyanik/mambaforge/envs/ufl23/bin/python (found suitable version "3.11.2", minimum required is "3.6")
  -- Found PythonLibs: /Users/mbagriyanik/mambaforge/envs/ufl23/lib/libpython3.11.dylib
  -- PYTHON 3.11.2
  -- Performing Test HAS_FLTO
  -- Performing Test HAS_FLTO - Success
  -- pybind11::lto enabled
  -- Performing Test HAS_FLTO_THIN
  -- Performing Test HAS_FLTO_THIN - Success
  -- pybind11::thin_lto enabled
  -- Configuring done (0.5s)
  -- Generating done (0.0s)
  -- Build files have been written to: /private/var/folders/lq/dh7kcps136n72nc_dhrly7nw0000gn/T/pip-install-wli41gqr/giotto-tda_6d92762b595147ea966f0f4868362d77/gtda/externals/pybind11/build
  Install the project...
  -- Install configuration: ""
  -- Up-to-date: /usr/local/include/pybind11
  CMake Error at cmake_install.cmake:41 (file):
    file INSTALL cannot set permissions on "/usr/local/include/pybind11":
    Operation not permitted.

  make: *** [Makefile:100: install] Error 1
  Install the project...
  -- Install configuration: ""
  -- Up-to-date: /usr/local/include/pybind11
  -- Installing: /usr/local/include/pybind11/attr.h
  -- Installing: /usr/local/include/pybind11/embed.h
  -- Installing: /usr/local/include/pybind11/numpy.h
  -- Installing: /usr/local/include/pybind11/pybind11.h
  -- Installing: /usr/local/include/pybind11/operators.h
  -- Installing: /usr/local/include/pybind11/iostream.h
  -- Installing: /usr/local/include/pybind11/gil.h
  -- Installing: /usr/local/include/pybind11/chrono.h
  -- Installing: /usr/local/include/pybind11/stl_bind.h
  -- Installing: /usr/local/include/pybind11/buffer_info.h
  -- Installing: /usr/local/include/pybind11/options.h
  -- Up-to-date: /usr/local/include/pybind11/eigen
  -- Installing: /usr/local/include/pybind11/eigen/matrix.h
  -- Installing: /usr/local/include/pybind11/eigen/common.h
  -- Installing: /usr/local/include/pybind11/eigen/tensor.h
  -- Up-to-date: /usr/local/include/pybind11/stl
  -- Installing: /usr/local/include/pybind11/stl/filesystem.h
  -- Installing: /usr/local/include/pybind11/functional.h
  -- Installing: /usr/local/include/pybind11/stl.h
  -- Up-to-date: /usr/local/include/pybind11/detail
  -- Installing: /usr/local/include/pybind11/detail/type_caster_base.h
  -- Installing: /usr/local/include/pybind11/detail/typeid.h
  -- Installing: /usr/local/include/pybind11/detail/descr.h
  -- Installing: /usr/local/include/pybind11/detail/internals.h
  -- Installing: /usr/local/include/pybind11/detail/common.h
  -- Installing: /usr/local/include/pybind11/detail/class.h
  -- Installing: /usr/local/include/pybind11/detail/init.h
  -- Installing: /usr/local/include/pybind11/common.h
  -- Installing: /usr/local/include/pybind11/eval.h
  -- Installing: /usr/local/include/pybind11/cast.h
  -- Installing: /usr/local/include/pybind11/type_caster_pyobject_ptr.h
  -- Installing: /usr/local/include/pybind11/eigen.h
  -- Installing: /usr/local/include/pybind11/pytypes.h
  -- Installing: /usr/local/include/pybind11/complex.h
  -- Installing: /usr/local/share/cmake/pybind11/pybind11Config.cmake
  -- Installing: /usr/local/share/cmake/pybind11/pybind11ConfigVersion.cmake
  -- Installing: /usr/local/share/cmake/pybind11/FindPythonLibsNew.cmake
  -- Installing: /usr/local/share/cmake/pybind11/pybind11Common.cmake
  -- Installing: /usr/local/share/cmake/pybind11/pybind11Tools.cmake
  -- Installing: /usr/local/share/cmake/pybind11/pybind11NewTools.cmake
  -- Installing: /usr/local/share/cmake/pybind11/pybind11Targets.cmake
  -- Installing: /usr/local/share/pkgconfig/pybind11.pc
  fatal: not a git repository (or any of the parent directories): .git
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/private/var/folders/lq/dh7kcps136n72nc_dhrly7nw0000gn/T/pip-install-wli41gqr/giotto-tda_6d92762b595147ea966f0f4868362d77/setup.py", line 183, in <module>
      setup(name=DISTNAME,
    File "/Users/mbagriyanik/mambaforge/envs/ufl23/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup
      return distutils.core.setup(**attrs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/mbagriyanik/mambaforge/envs/ufl23/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
      return run_commands(dist)
             ^^^^^^^^^^^^^^^^^^
    File "/Users/mbagriyanik/mambaforge/envs/ufl23/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
      dist.run_commands()
    File "/Users/mbagriyanik/mambaforge/envs/ufl23/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "/Users/mbagriyanik/mambaforge/envs/ufl23/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command
      super().run_command(command)
    File "/Users/mbagriyanik/mambaforge/envs/ufl23/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/Users/mbagriyanik/mambaforge/envs/ufl23/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 343, in run
      self.run_command("build")
    File "/Users/mbagriyanik/mambaforge/envs/ufl23/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "/Users/mbagriyanik/mambaforge/envs/ufl23/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command
      super().run_command(command)
    File "/Users/mbagriyanik/mambaforge/envs/ufl23/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/Users/mbagriyanik/mambaforge/envs/ufl23/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 131, in run
      self.run_command(cmd_name)
    File "/Users/mbagriyanik/mambaforge/envs/ufl23/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "/Users/mbagriyanik/mambaforge/envs/ufl23/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command
      super().run_command(command)
    File "/Users/mbagriyanik/mambaforge/envs/ufl23/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/private/var/folders/lq/dh7kcps136n72nc_dhrly7nw0000gn/T/pip-install-wli41gqr/giotto-tda_6d92762b595147ea966f0f4868362d77/setup.py", line 116, in run
      self.install_dependencies()
    File "/private/var/folders/lq/dh7kcps136n72nc_dhrly7nw0000gn/T/pip-install-wli41gqr/giotto-tda_6d92762b595147ea966f0f4868362d77/setup.py", line 150, in install_dependencies
      subprocess.check_call(['git', 'submodule', 'update',
    File "/Users/mbagriyanik/mambaforge/envs/ufl23/lib/python3.11/subprocess.py", line 413, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['git', 'submodule', 'update', '--init', '--recursive']' returned non-zero exit status 128.
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for giotto-tda Running setup.py clean for giotto-tda Failed to build giotto-tda ERROR: Could not build wheels for giotto-tda, which is required to install pyproject.toml-based projects`

This is versions of python and packages I am using:

Python (= 3.11.2) NumPy (=1.24.2) SciPy (= 1.10.1) joblib (= 1.3.0) scikit-learn (= 1.2.2) pyflagser (failed to install. submitted issue on pyflagser github account) python-igraph (= 0.10.4) plotly (= 5.15.0) ipywidgets (= 8.0.6)

@ulupo

mubagriyanik commented 1 year ago

https://github.com/giotto-ai/pyflagser/issues/81

noamteyssier commented 1 year ago

Had this problem too - you can work around by using python 3.10

mubagriyanik commented 1 year ago

Had this problem too - you can work around by using python 3.10

Thank you so much for the answer. Quick question: Only python version to change? Does that work with latest numpy or panda versions?

noamteyssier commented 1 year ago

Had this problem too - you can work around by using python 3.10

Thank you so much for the answer. Quick question: Only python version to change? Does that work with latest numpy or panda versions?

Didn't have any other issues - In the environment I'm using numpy==1.24.4 and pandas==2.0.3.

lizliz commented 7 months ago

Just wanted to bump this bug since I'm having a similar issue. Is there any plan to update giotto-tda to work with at least python 3.11?

matteocao commented 5 months ago

the above should now be fixed, as we just released a novel version with supprot for python 3.11