nilomr/pykanto

Installation problem

Closed this issue · 2 comments

Hi Nilo,

I would like to try pykanto to analyse my dataset, but I ran into some installation problem. This is probably only a beginner's issue, but please can you help me?

Installation was going fine until the last part on building wheels for collected packages: hdbscan, umap-learn, gpustat.

Building wheels for collected packages: hdbscan, umap-learn, gpustat
  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
  ╰─> [40 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-39
      creating build\lib.win-amd64-cpython-39\hdbscan
      copying hdbscan\flat.py -> build\lib.win-amd64-cpython-39\hdbscan
      copying hdbscan\hdbscan_.py -> build\lib.win-amd64-cpython-39\hdbscan
      copying hdbscan\plots.py -> build\lib.win-amd64-cpython-39\hdbscan
      copying hdbscan\prediction.py -> build\lib.win-amd64-cpython-39\hdbscan
      copying hdbscan\robust_single_linkage_.py -> build\lib.win-amd64-cpython-39\hdbscan
      copying hdbscan\validity.py -> build\lib.win-amd64-cpython-39\hdbscan
      copying hdbscan\__init__.py -> build\lib.win-amd64-cpython-39\hdbscan
      creating build\lib.win-amd64-cpython-39\hdbscan\tests
      copying hdbscan\tests\test_flat.py -> build\lib.win-amd64-cpython-39\hdbscan\tests
      copying hdbscan\tests\test_hdbscan.py -> build\lib.win-amd64-cpython-39\hdbscan\tests
      copying hdbscan\tests\test_prediction_utils.py -> build\lib.win-amd64-cpython-39\hdbscan\tests
      copying hdbscan\tests\test_rsl.py -> build\lib.win-amd64-cpython-39\hdbscan\tests
      copying hdbscan\tests\__init__.py -> build\lib.win-amd64-cpython-39\hdbscan\tests
      running build_ext
      cythoning hdbscan/_hdbscan_tree.pyx to hdbscan\_hdbscan_tree.c
      C:\Users\Lenovo\AppData\Local\Temp\pip-build-env-luthcaxl\overlay\Lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\Lenovo\AppData\Local\Temp\pip-install-mbgpjxwh\hdbscan_63f847e060124b379da7732cb554ec3b\hdbscan\_hdbscan_tree.pyx
        tree = Parsing.p_module(s, pxd, full_module_name)
      cythoning hdbscan/_hdbscan_linkage.pyx to hdbscan\_hdbscan_linkage.c
      C:\Users\Lenovo\AppData\Local\Temp\pip-build-env-luthcaxl\overlay\Lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\Lenovo\AppData\Local\Temp\pip-install-mbgpjxwh\hdbscan_63f847e060124b379da7732cb554ec3b\hdbscan\_hdbscan_linkage.pyx
        tree = Parsing.p_module(s, pxd, full_module_name)
      cythoning hdbscan/_hdbscan_boruvka.pyx to hdbscan\_hdbscan_boruvka.c
      C:\Users\Lenovo\AppData\Local\Temp\pip-build-env-luthcaxl\overlay\Lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\Lenovo\AppData\Local\Temp\pip-install-mbgpjxwh\hdbscan_63f847e060124b379da7732cb554ec3b\hdbscan\_hdbscan_boruvka.pyx
        tree = Parsing.p_module(s, pxd, full_module_name)
      cythoning hdbscan/_hdbscan_reachability.pyx to hdbscan\_hdbscan_reachability.c
      C:\Users\Lenovo\AppData\Local\Temp\pip-build-env-luthcaxl\overlay\Lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\Lenovo\AppData\Local\Temp\pip-install-mbgpjxwh\hdbscan_63f847e060124b379da7732cb554ec3b\hdbscan\_hdbscan_reachability.pyx
        tree = Parsing.p_module(s, pxd, full_module_name)
      cythoning hdbscan/_prediction_utils.pyx to hdbscan\_prediction_utils.c
      C:\Users\Lenovo\AppData\Local\Temp\pip-build-env-luthcaxl\overlay\Lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\Lenovo\AppData\Local\Temp\pip-install-mbgpjxwh\hdbscan_63f847e060124b379da7732cb554ec3b\hdbscan\_prediction_utils.pyx
        tree = Parsing.p_module(s, pxd, full_module_name)
      cythoning hdbscan/dist_metrics.pyx to hdbscan\dist_metrics.c
      C:\Users\Lenovo\AppData\Local\Temp\pip-build-env-luthcaxl\overlay\Lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\Lenovo\AppData\Local\Temp\pip-install-mbgpjxwh\hdbscan_63f847e060124b379da7732cb554ec3b\hdbscan\dist_metrics.pxd
        tree = Parsing.p_module(s, pxd, full_module_name)
      building 'hdbscan._hdbscan_tree' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for hdbscan
  Building wheel for umap-learn (setup.py) ... done
  Created wheel for umap-learn: filename=umap_learn-0.5.5-py3-none-any.whl size=86926 sha256=36ee3a032a5c8cb54059686551312ca35d1e95f4c6b27ea1b19e5de4efb6ddd9
  Stored in directory: c:\users\lenovo\appdata\local\pip\cache\wheels\0f\01\17\26951217a11fb724b7027c6dd5b620b6d368104f7e6d4171fc
  Building wheel for gpustat (pyproject.toml) ... done
  Created wheel for gpustat: filename=gpustat-1.1.1-py3-none-any.whl size=26573 sha256=8325ac55c9a7d3c078a3407b4804619d95490a44f1288299321eb0c7d4637fe3
  Stored in directory: c:\users\lenovo\appdata\local\pip\cache\wheels\12\7d\d7\444dca5ad3c5ea8c4e00ff211673505e0214fa9b0303dbd3b6
Successfully built umap-learn gpustat
Failed to build hdbscan
ERROR: Could not build wheels for hdbscan, which is required to install pyproject.toml-based projects

What can I do to solve this? Thanks in advance!

Best,
Rifa

Hi Rifa!

As per that error message, one of the system dependencies of hdbscan is not met, see below:

error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

Let me know if it works once you install MV C++ >=14.0! Alternatively, you could run this in a Unix-based system, eg by using the WSL.

Hi Nilo,

Thank you for your suggestion! I ended up installing in WSL and it was successful.

Cheers,
Rifa