pip has a -q/--quiet flag that works ideally from the command line. I'm using an automated deployment process (Amazon Elastic Beanstalk), and the tools use pip to install from a requirements file.
Unfortunately, pip is generating non-error output that's causing EB to abort due to its logger being unable to handle non-ASCII output.
Since I can't apply the quiet flag to the pip command directly (it's run automatically), is there a per-line flag I can set in my requirements file or an environment variable that would suppress pip's output?
If you are managing Python packages (libraries) with pip, you can use the configuration file requirements. txt to install the specified packages with the specified version.
Use the pip install -r requirements. txt command to install all of the Python modules and packages listed in your requirements. txt file.
In your case pip install -r requirements. txt will install the libraries listed in your requirements.
Pip offers the --quiet / -q
option to silence output. Example:
pip install -q -r requirements.txt
After more digging, this is a pending feature request for pip in github:
https://github.com/pypa/pip/issues/271
Temporary workaround: Using a separate bash script to invoke pip per-line until this is implemented, published, and available on Elastic Beanstalk.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With