build.sh failed in `aws-s3-deployment` due to the way `pip3` is invoked
See original GitHub issueNote: for support questions, please first reference our documentation, then use Stackoverflow. This repository’s issues are intended for feature requests and bug reports.
-
I’m submitting a …
- 🪲 bug report
- 🚀 feature request
- 📚 construct library gap
- ☎️ security issue or vulnerability => Please see policy
- ❓ support request => Please see note at the top of this template.
-
What is the current behavior? If the current behavior is a 🪲bug🪲: Please provide the steps to reproduce
./build.sh
under@aws-cdk/aws-s3-deployment
exits with 1 due to the following reason:
pip3 install --ignore-installed --prefix /tmp/tmp.VUvxbIE7Ql -r /tmp/tmp.5zArwykbRC/requirements.txt
ERROR: Can not combine '--user' and '--prefix' as they imply different installation locations
-
What is the expected behavior (or behavior of feature suggested)? the build script should have run successfully
-
Please tell us about your environment:
- CDK CLI Version: ?? (not sure where to look this up)
- Module Version: ?? (not sure where to look this up)
- OS: Ubuntu 18.04 launched using the latest EC2 AMI
- Language: N/A
-
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc) changing the line to:
PYTHONUSERBASE=${piptemp} pip3 install --ignore-installed -r ${staging}/requirements.txt
fixed the issue on Ubuntu. However, the exact command cause the build script to fail on Mac with:
+ pip3 install --ignore-installed -r /var/folders/v4/nbxvs8tj4ms68w5ghhnzn_f1ckngqg/T/tmp.iSt8znck/requirements.txt
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/lib'
Consider using the `--user` option or check the permissions.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top GitHub Comments
It looks like the pip community considers the Ubuntu/Debian version to be broken because of this behavior that was only merged into the Debian fork. Probably not worth fixing in the cdk scripts. https://github.com/pypa/pip/issues/1668#issuecomment-419613922 https://github.com/pypa/pip/issues/4222#issuecomment-417646535
Workarounds on Ubuntu are 1) install a virtualenv, 2) install from the official pip distribution, or 3) set env variable PIP_USER=0
I believe this has been resolved by https://github.com/aws/aws-cdk/pull/8487.
Please reach out if someone still experiences this.