create requirements.txt without virtualenv?
See original GitHub issuehi! Is there a way to create a requrirements.txt
file without creating a virtualenv? I’m trying to build a series of lambdas that each have separate Pipfile
s.
After cding into each lambdas fodler, I’m running pipenv lock -r | pip install -r /dev/stdin --target src
. Unfortunately, it creates a virtualenv per invocation which wastes time.
Is there an easy way to just translate the Pipfile.lock -> requirements.txt format without creating the virtualenv?
Thanks!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:15 (13 by maintainers)
Top Results From Across the Web
python - Automatically create requirements.txt - Stack Overflow
Use virtualenv and pip3 freeze > requirements.txt. Let me explain: pipreqs only saves packages which are imported in project, not their dependencies. Sometimes ......
Read more >How to Generate Requirements.txt for Your Python Project
A guide to generating Requirements.txt for Python project.
Read more >Why and How to make a Requirements.txt - Robert Boscacci
This is where a requirements. As long as the developers of this app provide a file listing the necessary packages, we can simply...
Read more >How to Create Requirements.txt File In Python - JCharisTech
How to Get the Requirements.txt File: Without VirtualEnv using Pipreqs. Pipreqs is the other simple alternative to use that doesn't require you ...
Read more >How to Create Requirements.txt File in Python - Javatpoint
The main reason behind this is that all users do not use the same version of libraries and packages. However, if you used...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
here’s a slightly more full-featured version of @uranusjr 's workaround for this issue, which I would still love to see the
pipenv
maintainers reconsider.AWS Lambda requires a flat folder with all packages installed. I’m running the same command (
pipenv lock -r | pipenv run pip install -r /dev/stdin --target src
) in production on codepipeline and for local development via the aws-sam-cli.Locally, I need to prefix
pipenv run
to pip install so thatpip
doesn’t see my globally installed packages. Otherwise, locally, I get weird issues like:In production, the virtualenv doesn’t exist so the weird parallel creation of virtualenv occurs.
Might be too much of an edgecase.