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.

Add possibility to install dependencies to target directory. pip -t flag analogue

See original GitHub issue
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Feature Request

Add possibility to install dependencies to target directory. pip -t flag analogue.

The proposed command example is

poetry install -t ./vendor

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:115
  • Comments:28 (4 by maintainers)

github_iconTop GitHub Comments

59reactions
stevekrasinskycommented, Oct 25, 2021

Another vote for the AWS Lambda use case.

59reactions
RobbieClarkencommented, Apr 11, 2020

could you please add a use case, where you think this feature would be useful?

I’m interested in this feature to be able to download and build python packages as part of deploying to AWS Lambda. In order to deploy to Lambda you need to zip up your source code and dependencies and upload them to an S3 bucket. My build currently involves doing:

poetry export -f requirements.txt --without-hashes > requirements.txt
pip install -r requirements.txt -t ./bundle/

The --without-hashes is needed or I get an error when I pip install:

ERROR: In --require-hashes mode, all requirements must have their versions pinned with ==. These do not:
    setuptools>=39.2.0 from https://files.pythonhosted.org/packages/a0/df/635cdb901ee4a8a42ec68e480c49f85f4c59e8816effbf57d9e6ee8b3588/setuptools-46.1.3-py3-none-any.whl#sha256=4fe404eec2738c20ab5841fa2d791902d2a645f32318a7850ef26f8d7215a8ee (from cairocffi==1.1.0->-r requirements.txt (line 1))

It would be nice to be able to run something like:

poetry install -t ./bundle/

This would have the advantage of verifying hashes, simplifying the build and removing the direct dependency on pip.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pip install to custom target directory and exclude specific ...
I want to exclude specific dependencies since they are already met from a different install path (e.g. an anaconda install). I don't have...
Read more >
pip install - pip documentation v22.3.1
The install command has a --report option that will generate a JSON report of what pip has installed. In combination with the --dry-run...
Read more >
How to Publish an Open-Source Python Package to PyPI
It comes with a pip-compile command that can create or update a complete list of dependencies. See the pip-tools documentation for more ...
Read more >
Docker Compose release notes
Dependencies upgrade: bumped github.com/containerd/containerd from 1.6.2 to 1.6.6. Bug fixes and enhancements . Added links to container create request. Fixes ...
Read more >
Installing jupyter_contrib_nbextensions
First, the Python pip package needs to be installed. Then, the notebook extensions themselves need to be copied to the Jupyter data directory....
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