本文介绍了完整更新pip软件包时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
pip使用命令更新所有软件包时
While pip update all packages with command
pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs pip install -U
出现 vboxapi
Downloading/unpacking vboxapi
Could not find any downloads that satisfy the requirement vboxapi
Some externally hosted files were ignored (use --allow-external vboxapi to allow).
Some insecure and unverifiable files were ignored (use --allow-unverified vboxapi to allow).
Cleaning up...
No distributions at all found for vboxapi
Storing debug log for failure in /Users/rmuhamedgaliev/.pip/pip.log
我可以说pip在更新时忽略vboxapi吗?我尝试过命令
Can i say pip ignore vboxapi while update?I tried commands
pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs pip install -U -I
pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs pip install -U -I --allow-external vboxapi
推荐答案
是的,您可以忽略vboxapi
程序包.
Yes, you can ignore the vboxapi
package like this.
grep -Pv '^(?:\-e|vboxapi\=)'
-
-P
标志告诉grep使用与Perl兼容的正则表达式. -
-v
标志表示仅列出与以下正则表达式不匹配的内容. - 正则表达式匹配以
-e
或vboxapi=
开头的行 - The
-P
flag tells grep to use perl-compatible regex. - The
-v
flag says to only list those which do not match the regex that follows. - The regex matches lines that begin with
-e
orvboxapi=
要完成的操作的完整示例:
pip freeze --local | grep -Pv '^(?:\-e|vboxapi\=)' | cut -d = -f 1 | xargs -n1 pip install -U;
这篇关于完整更新pip软件包时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!