Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facing Installation Issue on pip install panoptes_aggregation #797

Open
runsenwu opened this issue Nov 23, 2024 · 0 comments
Open

Facing Installation Issue on pip install panoptes_aggregation #797

runsenwu opened this issue Nov 23, 2024 · 0 comments

Comments

@runsenwu
Copy link

Recently tried to install the panoptes_aggregation as per the Pypi website

But facing this error:

`Building wheels for collected packages: hdbscan, lxml, python-levenshtein
Building wheel for hdbscan (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for hdbscan (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [186 lines of output]
/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'test_suite'
warnings.warn(msg)
/private/var/folders/r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/setuptools/distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
running bdist_wheel
running build
running build_py
creating build/lib.macosx-14.4-arm64-cpython-39/hdbscan
copying hdbscan/validity.py -> build/lib.macosx-14.4-arm64-cpython-39/hdbscan
copying hdbscan/flat.py -> build/lib.macosx-14.4-arm64-cpython-39/hdbscan
copying hdbscan/init.py -> build/lib.macosx-14.4-arm64-cpython-39/hdbscan
copying hdbscan/prediction.py -> build/lib.macosx-14.4-arm64-cpython-39/hdbscan
copying hdbscan/plots.py -> build/lib.macosx-14.4-arm64-cpython-39/hdbscan
copying hdbscan/hdbscan
.py -> build/lib.macosx-14.4-arm64-cpython-39/hdbscan
copying hdbscan/robust_single_linkage
.py -> build/lib.macosx-14.4-arm64-cpython-39/hdbscan
creating build/lib.macosx-14.4-arm64-cpython-39/hdbscan/tests
copying hdbscan/tests/test_flat.py -> build/lib.macosx-14.4-arm64-cpython-39/hdbscan/tests
copying hdbscan/tests/test_prediction_utils.py -> build/lib.macosx-14.4-arm64-cpython-39/hdbscan/tests
copying hdbscan/tests/init.py -> build/lib.macosx-14.4-arm64-cpython-39/hdbscan/tests
copying hdbscan/tests/test_rsl.py -> build/lib.macosx-14.4-arm64-cpython-39/hdbscan/tests
copying hdbscan/tests/test_hdbscan.py -> build/lib.macosx-14.4-arm64-cpython-39/hdbscan/tests
running build_ext
/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-install-_27_ebn3/hdbscan_a5930c3701c5433ea0e02ddc3f2a7629/hdbscan/_hdbscan_tree.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
Compiling hdbscan/_hdbscan_tree.pyx because it changed.
[1/1] Cythonizing hdbscan/_hdbscan_tree.pyx
building 'hdbscan._hdbscan_tree' extension
creating build/temp.macosx-14.4-arm64-cpython-39/hdbscan
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -DOPENSSL_NO_SSL3 -I/Users/runsenwu/history_research/.venv/include -I/Users/runsenwu/.pyenv/versions/3.9.18/include/python3.9 -I/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/numpy/core/include -c hdbscan/_hdbscan_tree.c -o build/temp.macosx-14.4-arm64-cpython-39/hdbscan/_hdbscan_tree.o
In file included from hdbscan/_hdbscan_tree.c:1240:
In file included from /private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
In file included from /private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/numpy/core/include/numpy/ndarraytypes.h:1969:
/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
17 | #warning "Using deprecated NumPy API, disable it with "
| ^
hdbscan/_hdbscan_tree.c:39802:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
39802 | CYTHON_FALLTHROUGH;
| ^
hdbscan/_hdbscan_tree.c:557:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
557 | #define CYTHON_FALLTHROUGH attribute((fallthrough))
| ^
hdbscan/_hdbscan_tree.c:39813:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
39813 | CYTHON_FALLTHROUGH;
| ^
hdbscan/_hdbscan_tree.c:557:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
557 | #define CYTHON_FALLTHROUGH attribute((fallthrough))
| ^
3 warnings generated.
clang -bundle -undefined dynamic_lookup -L/opt/homebrew/opt/ncurses/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/readline/lib -L/Users/runsenwu/.pyenv/versions/3.9.18/lib -Wl,-rpath,/Users/runsenwu/.pyenv/versions/3.9.18/lib -L/opt/homebrew/lib -Wl,-rpath,/opt/homebrew/lib -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib -L/opt/homebrew/opt/ncurses/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/readline/lib -L/Users/runsenwu/.pyenv/versions/3.9.18/lib -Wl,-rpath,/Users/runsenwu/.pyenv/versions/3.9.18/lib -L/opt/homebrew/lib -Wl,-rpath,/opt/homebrew/lib -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib build/temp.macosx-14.4-arm64-cpython-39/hdbscan/_hdbscan_tree.o -L/Users/runsenwu/.pyenv/versions/3.9.18/lib -o build/lib.macosx-14.4-arm64-cpython-39/hdbscan/_hdbscan_tree.cpython-39-darwin.so
ld: warning: duplicate -rpath '/Users/runsenwu/.pyenv/versions/3.9.18/lib' ignored
ld: warning: duplicate -rpath '/opt/homebrew/lib' ignored
/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-install-_27_ebn3/hdbscan_a5930c3701c5433ea0e02ddc3f2a7629/hdbscan/_hdbscan_linkage.pyx
tree = Parsing.p_module(s, pxd, full_module_name)

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
  import numpy as np
  cimport numpy as np
  
  from libc.float cimport DBL_MAX
  
  from dist_metrics cimport DistanceMetric
  ^
  ------------------------------------------------------------
  
  hdbscan/_hdbscan_linkage.pyx:12:0: 'dist_metrics.pxd' not found
  
  Error compiling Cython file:
  ------------------------------------------------------------
  ...
  import numpy as np
  cimport numpy as np
  
  from libc.float cimport DBL_MAX
  
  from dist_metrics cimport DistanceMetric
  ^
  ------------------------------------------------------------
  
  hdbscan/_hdbscan_linkage.pyx:12:0: 'dist_metrics/DistanceMetric.pxd' not found
  
  Error compiling Cython file:
  ------------------------------------------------------------
  ...
  
  
  cpdef np.ndarray[np.double_t, ndim=2] mst_linkage_core_vector(
          np.ndarray[np.double_t, ndim=2, mode='c'] raw_data,
          np.ndarray[np.double_t, ndim=1, mode='c'] core_distances,
          DistanceMetric dist_metric,
          ^
  ------------------------------------------------------------
  
  hdbscan/_hdbscan_linkage.pyx:58:8: 'DistanceMetric' is not a type identifier
  
  Error compiling Cython file:
  ------------------------------------------------------------
  ...
                  continue
  
              right_value = current_distances[j]
              right_source = current_sources[j]
  
              left_value = dist_metric.dist(&raw_data_ptr[num_features *
                                            ^
  ------------------------------------------------------------
  
  hdbscan/_hdbscan_linkage.pyx:129:42: Cannot convert 'double_t *' to Python object
  
  Error compiling Cython file:
  ------------------------------------------------------------
  ...
              right_value = current_distances[j]
              right_source = current_sources[j]
  
              left_value = dist_metric.dist(&raw_data_ptr[num_features *
                                                          current_node],
                                            &raw_data_ptr[num_features * j],
                                            ^
  ------------------------------------------------------------
  
  hdbscan/_hdbscan_linkage.pyx:131:42: Cannot convert 'double_t *' to Python object
  Compiling hdbscan/_hdbscan_linkage.pyx because it changed.
  [1/1] Cythonizing hdbscan/_hdbscan_linkage.pyx
  Traceback (most recent call last):
    File "/Users/runsenwu/history_research/.venv/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/Users/runsenwu/history_research/.venv/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/Users/runsenwu/history_research/.venv/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
    File "/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 438, in build_wheel
      return _build(['bdist_wheel', '--dist-info-dir', str(metadata_directory)])
    File "/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 426, in _build
      return self._build_with_temp_dir(
    File "/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 407, in _build_with_temp_dir
      self.run_setup()
    File "/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 522, in run_setup
      super().run_setup(setup_script=setup_script)
    File "/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 320, in run_setup
      exec(code, locals())
    File "<string>", line 96, in <module>
    File "/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 117, in setup
      return distutils.core.setup(**attrs)
    File "/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 183, in setup
      return run_commands(dist)
    File "/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 199, in run_commands
      dist.run_commands()
    File "/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands
      self.run_command(cmd)
    File "/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 995, in run_command
      super().run_command(command)
    File "/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
      cmd_obj.run()
    File "/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/setuptools/command/bdist_wheel.py", line 381, in run
      self.run_command("build")
    File "/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 995, in run_command
      super().run_command(command)
    File "/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
      cmd_obj.run()
    File "/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 995, in run_command
      super().run_command(command)
    File "/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
      cmd_obj.run()
    File "<string>", line 26, in run
    File "/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
      self.build_extensions()
    File "/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 476, in build_extensions
      self._build_extensions_serial()
    File "/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 502, in _build_extensions_serial
      self.build_extension(ext)
    File "/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/Cython/Distutils/build_ext.py", line 130, in build_extension
      new_ext = cythonize(
    File "/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
      cythonize_one(*args)
    File "/private/var/folders/_r/c19r5h4j3gx42ldf9wcv8l_h0000gn/T/pip-build-env-h1p5sbig/overlay/lib/python3.9/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
      raise CompileError(None, pyx_file)
  Cython.Compiler.Errors.CompileError: hdbscan/_hdbscan_linkage.pyx
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for hdbscan`

I have tried installing using Pip, then using Conda, then creating a new venv, and they all are facing this same issue.

Also tried looking into hdbscan issues, and thought it possibly could've been an issue with Cython version following this thread: scikit-learn-contrib/hdbscan#600

It seems that the error maybe cause because the current package is using hdbscan version: 0.8.28, where the issue seems to be fixed in version 0.8.33.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant