Install just dependencies from pyproject.toml like from requirements with -r
See original GitHub issueWhat’s the problem this feature will solve?
Python encourage user to put all project infomation into one file: pyproject.toml , including dependencies.
But currently, users who want to just install dependencies and run a project, I mean not install it into site-packages, could not do this just with pip.
People have to use pip-tools
generate requirements.txt first.
Describe the solution you’d like
pip install -r pyproject.toml
Alternative Solutions
$ pip install pip-tools
$ python -m piptools compile \
-o requirements.txt \
pyproject.toml
$ pip install -r requirements.txt
Additional context
No
Code of Conduct
- I agree to follow the PSF Code of Conduct.
Issue Analytics
- State:
- Created 10 months ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Download dependencies declared in pyproject.toml using Pip
As of version 10.0, pip supports projects declaring dependencies that are required at install time using a pyproject.toml file, in the form ...
Read more >pip-tools Supports pyproject.toml - Hynek Schlawack
Technically, you only need to pass -r dev-requirements.txt here, since it contains all main dependencies too. I pass them both to ensure I'm ......
Read more >How to download Python dependencies - ActiveState
Use the pipdeptree utility to gather a list of all dependencies, create a requirements.txt file listing all the dependencies, and then download ...
Read more >Manually adding dependencies to pyproject.toml - Packaging
First, you can use pip list --not-required to only list your top level dependencies. However, my usual workflow is to always add a...
Read more >Commands | Documentation | Poetry - Python dependency ...
When --only is specified, --with and --without options are ignored. add #. The add command adds required packages to your pyproject.toml and installs...
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 Free
Top 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
I don’t think that installing dependencies and running a project uninstalled is a pattern we want to encourage. If you’re running your project uninstalled, it’s probably an application, not a library, and applications should be using a requirements file. See https://caremad.io/posts/2013/07/setup-vs-requirement/
See discussions in #4783. The final comment mentioned container image layers, which I think is a use case that’s more relevant now than back then. I still believe this belongs to workflow tools (e.g. pip-tools, poetry, pdm) instead of pip, however.