Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using poetry add 'package[all]' doesn't install extra dependencies (happens only with 'all') #7646

Open
2 of 4 tasks
aberges-grd opened this issue Mar 14, 2023 · 4 comments
Open
2 of 4 tasks
Labels
kind/feature Feature requests/implementations

Comments

@aberges-grd
Copy link

  • Poetry version: 1.4.0
  • Python version: 3.8.10
  • OS version and name: Ubuntu 22.04
  • pyproject.toml:
  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

The issue is fairly simple. On a new poetry project, I used (I will report with the package used in case it helps):

poetry add 'polars[all]'

poetry installs polars but no extras. Meanwhile, on an isolated environment, using pip install 'polars[all]' does install every extra dependency listed by that package.

However, poetry works well if I specify which extras to install, e.g.:

poetry add 'polars[numpy,pandas,pyarrow,connectorx]'

works.

@aberges-grd aberges-grd added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Mar 14, 2023
@dimbleby
Copy link
Contributor

previously rejected, for better or worse, at #3369

@finswimmer finswimmer added kind/feature Feature requests/implementations and removed kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Apr 28, 2023
@rtest2344
Copy link

Adding here in addition to #8496:

Documentation states that this should work here.

@maxsegl
Copy link

maxsegl commented Sep 5, 2024

So i tried as suggested in the documentation to install the optional groups optional and meshing (see the pyproject of the package)

poetry add "colour-science[optional,meshing]"

This added correctly to my own pyproject.toml:

[tool.poetry]
name = "color_test"
version = "0.1.0"
description = ""
readme = "README.md"
package-mode = false

[tool.poetry.dependencies]
python = ">=3.12,<3.13"
colour-science = {extras = ["optional","meshing"], version = "^0.4.4"}

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

But in the installation the extras were ignored. Also running

poetry install --all-extras

changed nothing. Only direct installation of the dependencies made things work for me, which is not the idea of using extras, I guess.

Am I missing something?

@clintonroy
Copy link
Contributor

Poetry groups are (at the moment) a poetry specific concept that does not propagate to the published wheel. They're for things like development dependencies, cicd pipeline stuff, documentation tools etc.

Extras are an upstream python wheel thing, that get published to the wheel metadata.

color-science has groups, it does not have extras.

potentially here, poetry could/should warn that the requested extras don't exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Feature requests/implementations
Projects
None yet
Development

No branches or pull requests

6 participants