MaartenGr/BERTopic

Can't install hdbscan on windows 11: "'building._hdbscan_tree' extension error: [WinError 5] Access is denied"

Opened this issue · 4 comments

I am struggling to get bertopic installed on a windows machine. hdbscan seems to fail everytime. Here are the details of what I trying to do and what i have done:

  1. I am trying to install in a virtual environment
  2. Initially i ran into the problem regarding MS c++ 14. I installed, and that error disappeared.
  3. Now i get the error error:
...
tree = Parsing.p_module(s, pxd, full_module_name)
building 'hdbscan._hdbscan_tree' extension
[WinError 5] Access is denied
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for hdbscan
Failed to build hdbscan
ERROR: Could not build wheels for hdbscan, which is required to install pyproject.toml-based projects
  1. I get this error when i try py -m pip install bertopic and when i try py -m pip install hdbscan
  2. I have tried updating pip: py -m pip install --upgrade pip
  3. I have tried running everything from a command prompt (rather than from my IDE)
  4. I have tried rebooting the machine and only opening a command prompt and running the install
  5. I have tried running from powershell as an adminstrator - using python rather than py when executing the above calls.

If anyone can tell what might be causing this permission error, I would be enormously appreciative.

Other than starting from a new environment with a potentially different python version, I'm not entirely sure what to make of this. Could you also share this issue on the HDBSCAN repo? Perhaps they can help you out!

Thanks. Will try the HDBSCAN repo. Will report back here if i find anything.

Starting from a new environment with python 3.9 worked for me.

Other than starting from a new environment with a potentially different python version, I'm not entirely sure what to make of this. Could you also share this issue on the HDBSCAN repo? Perhaps they can help you out!

OK, @mikeolubode thanks. Python 3.9 also worked for me. I posted this issue on the HDBSCAN repo and will update with this, indicating that the error appears to be with python 3.12.3. Thanks so much to both of you.

Full steps for a solution are here: https://stackoverflow.com/questions/78311773/cant-install-package-with-pip-error-winwrror-5-access-is-denied/78380938#78380938