2014-09-23 53 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;