我能够更新pip托管包,但是如何更新pip本身?根据pip --version,我目前在我的virtualenv中安装了pip 1.1,我想更新到最新版本.
命令是什么?我是否需要使用分发或是否有本机pip或virtualenv命令?我已经尝试过pip update,并pip update pip没有成功.
我正在为我的python应用程序使用pip和virtualenv.我想在不触及依赖项的情况下升级到新版本的应用程序.当我使用时pip install -U,它会尝试升级所有软件包,甚至在没有新版本时卸载并重新安装相同版本的依赖软件包.
我也试过,pip install -U --no-deps但这似乎相当于常规安装而不是升级.是否有标志组合可以满足我的需求?
我最近将我的系统从 Ubuntu 18.04 更新到 20.04。之后,我尝试使用此处提到的 shell 命令更新我所有的 pip3 包(我将“pip”更改为“pip3”)。
在更新了几个包后,出现了这个提示: KDE Wallet Service
由于我在更新/安装软件包时从未见过它,因此我取消了它,导致立即重新打开相同的提示,并且终端显示以下警告:
WARNING: Keyring is skipped due to an exception: Failed to unlock the keyring!
Run Code Online (Sandbox Code Playgroud)
在它尝试安装的下一个包发生同样的情况后,我按下了 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 …Run Code Online (Sandbox Code Playgroud) 这里的答案展示了如何使用 pip 安装本地包。不过,我也有兴趣了解如何更新软件包。例如,如果我之前安装了版本 1.0.0 的软件包,现在我想将其替换为 1.0.1,我该怎么做?我能想到的一种方法是使用 pip uninstall 然后安装新的,但是有没有更优雅的方法?