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

Can't install HDBSCAN via pip: [WinError 5] Access is denied #629

Open
morrisseyj opened this issue Apr 19, 2024 · 1 comment
Open

Can't install HDBSCAN via pip: [WinError 5] Access is denied #629

morrisseyj opened this issue Apr 19, 2024 · 1 comment

Comments

@morrisseyj
Copy link

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.

  • I am on Windows 11

  • I am trying to install to a virtual environment: py -m venv [path-to-environment] Note that when I activate the virtual environment i get the following error '"C:WINDOWS\System32\chcp.com"' is not recognized as an internal or external command, operable program or batch file.. Despite this, the environment activates.

  • Initially when trying the install I ran into a problem regarding MS C++14 requirements. I installed those and the error when away.

  • Now i can't get around the error: Building wheel for hdbscan (pyproject.toml) did not run successfully. Specific error is as follows:

    building 'hdbscan._hdbscan_tree' extension
          error: [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
    
  • Its the same error whether i try py -m pip install bertopic and py -m pip install hdbscan

  • I have tried running as admin - since python is in the admin path i call python rather than py when repeating the above commands.

  • I have tried updating pip in the virtual env py -m pip install --upgrade pip - everything is fine

  • I have made sure to run from the command prompt rather than the IDE

  • I have rebooted my machine and tried running this as the first thing i do

  • I have tried adding the --user option but i get the response that this is available in the virtualenv: ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.

  • I note that my venv has its permissions set to read only. I changed this and ran the install again. Made no difference. Note on this, i am able to install other packages, with permissions being set to read-only, so i don't think this is the issue.

  • I looked through my AppData\Local\Temp directory to delete any pip related folders, but found nothing (though there are some pyright and python-languageserver folders in there)

I posted this question on the bertopic repo (MaartenGr/BERTopic#1922) and on SO (https://stackoverflow.com/questions/78311773/cant-install-package-with-pip-error-winwrror-5-access-is-denied), but had no luck so trying here.

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

@morrisseyj
Copy link
Author

morrisseyj commented Apr 24, 2024

An update here. I tried reverting to a different version of python and everything worked fine. I could successfully install on python 3.9. The error was occurring on python 3.12.3. If there is anything i can do to aid with troubleshooting the issue on 3.12, let me know.

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

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