Error while full update pip packages

Rinat Mukhamedgaliev asked
python pip setuptools
via

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


Answer
via

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;
Share This
Posted in: