2014-09-23 50 views
4

虽然PIP更新命令所有包错误而完全更新PIP封装

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而更新? 我试着命令

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 

回答

3

是的,你可以忽略vboxapi包这样。

grep -Pv '^(?:\-e|vboxapi\=)' 
  • -P标志告诉grep来使用Perl兼容的正则表达式。
  • -v标志说只列出那些做不是匹配下面的正则表达式。你想实现什么
  • 正则表达式匹配以-evboxapi=

完整的示例开始为线:

pip freeze --local | grep -Pv '^(?:\-e|vboxapi\=)' | cut -d = -f 1 | xargs -n1 pip install -U;