question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

build.sh failed in `aws-s3-deployment` due to the way `pip3` is invoked

See original GitHub issue

Note: 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:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
clareliguoricommented, Jun 27, 2019

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

0reactions
iliapolocommented, Aug 29, 2020

I believe this has been resolved by https://github.com/aws/aws-cdk/pull/8487.

Please reach out if someone still experiences this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Warning: pip is being invoked by an old script wrapper
When I directly type pip list to the terminal, I get the above warning. What does it mean exactly? Should I always use...
Read more >
How to install and use Pip3 - ActiveState
Pip3 installs packages from PyPI (Python Package Index), but won't resolve dependencies or help you solve dependency conflicts.
Read more >
Using Python's pip to Manage Your Projects' Dependencies
In this tutorial, you'll learn how to: Set up pip in your working environment; Fix common errors related to working with pip; Install...
Read more >
Bazel Tutorial - Running a python script and installing PIP ...
In this video I go through the steps required to use the basic python rules in bazel to:- Download a standalone (hermetic) python...
Read more >
How to Install and What is Python Pip? - DataCamp
This is because pip will install any other packages that scikit-learn depends on. These other packages are called dependencies.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found