为什么在Ubuntu 20.04上安装/更新软件包后pip3为什么要创建kdewallet?

问题描述

我最近将系统从Ubuntu 18.04更新到了20.04。之后,我尝试使用提到的here的shell命令更新所有pip3软件包(我将“ pip”更改为“ pip3”)。

在更新了几个软件包之后,出现以下提示: KDE Wallet Service

由于我在更新/安装软件包时从未见过,因此我取消了它,导致立即重新打开同一提示符,并且终端显示以下警告:

WARNING: Keyring is skipped due to an exception: Failed to unlock the keyring!

在尝试安装的下一个软件包发生同样的情况后,我按了CTRL + C。从那时起,我尝试安装软件包时就发生了同样的事情。

示例:

pip3 install numpy
WARNING: Keyring is skipped due to an exception: Failed to unlock the keyring!
WARNING: Keyring is skipped due to an exception: Failed to unlock the keyring!
Collecting numpy
  WARNING: Keyring is skipped due to an exception: Failed to unlock the keyring!
  Using cached numpy-1.19.2-cp38-cp38-manylinux2010_x86_64.whl (14.5 MB)
Installing collected packages: numpy
  WARNING: The scripts f2py,f2py3 and f2py3.8 are installed in '/home/gesuchter/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or,if you prefer to suppress this warning,use --no-warn-script-location.
Successfully installed numpy-1.19.2

我已经尝试通过重新安装python3-pip来解决问题。

希望这里有一些有用的信息:

pip3 --version
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)

ls ~/.local/share/keyrings
default  login.keyring  user.keystore

find ~/.config/kwalletrc
find: ‘/home/gesuchter/.config/kwalletrc’: No such file or directory

解决方法

此问题已在上游报告,请参阅https://github.com/pypa/pip/issues/8090以及该线程链接的其他问题。

tl; dr:的新版本的pip也会急切地在密钥环中搜索访问某些软件包下载所需的凭据。如果最后查询了尚不存在的密钥环(例如kdewallet),则会显示提示。尚不清楚如何完全确定此版本以及在哪个版本中完全固定。

编辑:请注意,stackoverflow不是错误报告的正确位置:pip维护人员不太可能看到此错误,据我所知,它实际上也不在stackoverflow范围之内。对于另一个stackexchange社区(也许是超级用户?),这可能是一个问题。但是,由于您已经确定这是点子的问题,因此,报告的最佳位置应该是https://github.com/pypa/pip

上的README中指示的任何沟通渠道。 ,

您可以将其添加到您的启动文件中

export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring

归功于jrd's comment on a python bug

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...