16

I've been trying to run pip list -o and pip list --outdated to see if any packages need to be updated but it enters a loop of printing: WARNING: Keyring is skipped due to an exception: Failed to create the collection: Prompt dismissed..

I've upgraded keyring and the version was already up-to-date. I've seen this keyring warning whilst using pip install {package} --upgrade to upgrade other packages as well.

Lauren
  • 163
  • 1
  • 1
  • 6
  • 8
    I have something similar, as far as I understood it's because I setup my OS (Ubuntu) to login without having to enter the password. Not entirely sure about the implications, side-effects, etc. but `keyring --disable` helped in my case. As far as I can see it added en empty `backend` in the `~/.local/share/python_keyring/keyringrc.cfg` file. Some references: https://github.com/pypa/pip/issues/6773 -- https://github.com/jaraco/keyring#disabling-keyring – sinoroc May 27 '20 at 08:49
  • Can you specify the OS you're using please, and wither if you're running the pip command from a virtual environment environment or not. – Mohamed Mostafa Jan 31 '22 at 05:43
  • Please provide more context to this question. – Derek Chia Feb 01 '22 at 03:23
  • What is your pip version? – stuck Feb 02 '22 at 15:05

1 Answers1

7

I searched the web about that topic and find that GitHub issue.

If your pip version is any version before "21.1", you can try to upgrade pip to the latest version with pip install --upgrade pip command.

Also, as a workaround, you can consider the following answer of jrd from the above link:

Exporting PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring prevent python from using any keyring. PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring pipenv update does not ask me anything anymore. So, as a temporary solution, one might want to put this in a .env file.

stuck
  • 1,477
  • 2
  • 14
  • 30
  • 1
    This also worked for me directly using pip PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring python3 -m pip install – Paul Feb 06 '22 at 17:37