Error while full update pip packages

混江龙づ霸主 提交于 2019-12-06 04:17:53

问题


While pip update all packages with command

pip freeze --local | grep -v '^\-e' | cut -d = -f 1  | xargs pip install -U

Pip print error with 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

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

回答1:


Yes, you can ignore the vboxapi package like this.

grep -Pv '^(?:\-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 or vboxapi=

Full example for what you want to accomplish:

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


来源:https://stackoverflow.com/questions/25987540/error-while-full-update-pip-packages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!