piphdbscan

Can't install package with pip: "error [WinWrror 5] Access is denied"


I am struggling to install hdbscan into a virtual environment. I am trying to do this as part of a bertopic install - which is also failing when trying to install hdbscan as a dependency.

I have looked through a number of SO pages on this error and tried almost everything, but nothing seems to work. Here are the specifics and what I have tried.

If anyone knows how I can diagnose the issue here, i would greatly appreciate it.


Solution

  • An update on this. Help from mikeolubode on the bertopic repo (https://github.com/MaartenGr/BERTopic/issues/1922) showed that this will install with python 3.9. I had also posted the issue to the HDBSCAN repo, and have updated that the problem appears to be with python 3.12.3.

    For anyone wanting more specific instructions:

    If you haven't already, delete your existing virtual environment.

    Download and install python 3.9 (https://www.python.org/downloads/release/python-390/)

    Create your new virtual environment calling python 3.9. I am using the python launcher so at the command line that is:

    py -3.9 -m venv [path_to_your_venv]
    

    Activate your environment:

    [path_to_your_venv]\Scripts\activate
    

    And install HDBSCAN:

    py -m pip install hdbscan
    

    Everything now completes for me.