Huggingface-cli login

Hi… I see a few other huggingface login threads but they don’t help unfortunately. Mostly the threads advise the token input appears blank. I realise right clicking actually pastes and I’ve tried this manually and edited in file.

I have installed Release Version: Python 3.10.6

Both attempts give the same result. I have also tried as suggested installing Git-2.38.1-64-bit (Git for Windows).

CMD as Admin, using activate and huggingface-cli login, as follows:
(myAMD_venv) C:\Users\me\myPython\myStable Diffusion\myAMD_venv\Scripts>huggingface-cli login

outputs this error info…

Traceback (most recent call last):
  File "C:\Users\me\AppData\Local\Programs\Python\Python310\lib\", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\me\AppData\Local\Programs\Python\Python310\lib\", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\me\myPython\myStable Diffusion\myAMD_venv\Scripts\huggingface-cli.exe\", line 7, in <module>
  File "C:\Users\me\myPython\myStable Diffusion\myAMD_venv\lib\site-packages\huggingface_hub\commands\", line 45, in main
  File "C:\Users\me\myPython\myStable Diffusion\myAMD_venv\lib\site-packages\huggingface_hub\commands\", line 149, in run
    _login(self._api, token=token)
  File "C:\Users\me\myPython\myStable Diffusion\myAMD_venv\lib\site-packages\huggingface_hub\commands\", line 320, in _login
  File "C:\Users\me\myPython\myStable Diffusion\myAMD_venv\lib\site-packages\huggingface_hub\", line 719, in set_access_token
    write_to_credential_store(USERNAME_PLACEHOLDER, access_token)
  File "C:\Users\me\myPython\myStable Diffusion\myAMD_venv\lib\site-packages\huggingface_hub\", line 588, in write_to_credential_store
    with subprocess.Popen(
  File "C:\Users\me\AppData\Local\Programs\Python\Python310\lib\", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Users\me\AppData\Local\Programs\Python\Python310\lib\", line 1438, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

I am following a youtube Stable Defusion AMD install (Run Stable Diffusion With AMD GPU (RX580) On Windows - YouTube) and while many appear to have successfully followed the tutorial with success - I see several others run into trouble exactly where I have at huggingface-cli login.

I would be grateful if some advice could help me progress… thanks

1 Like

I seem to have made progress to login and I think the issue was something not explained in the video.

On huggingface homepage, on the right - Trending, I had to click


If you can’t see it, use the search… and scroll down to Agree & Access Repository

This didn’t immediately work, but after I restarted my computer and re-activated and ran the login it has worked and logged me in with my token coded into the file.