Skip to content

Multiple environment markers doesn't work #7722

@marhoy

Description

@marhoy
  • Poetry version: 1.4.1
  • Python version: 3.10.7
  • OS version and name: Ubuntu 22.04.2 and Debian 11
  • 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

I'm trying to install a different version of torch, depending on the CPU. If I'm on the Raspberry Pi, I want to use the wheel from download.pytorch.org, otherwise I can install from pypi. (The reason for this is a cuda-dependency-issue, but that's not the point here).

I have the following in my pyproject.toml

torch = [
    { markers = "platform_machine == 'aarch64'", url = "https://download.pytorch.org/whl/torch-1.13.1-cp310-cp310-manylinux2014_aarch64.whl"},
    { markers = "platform_machine == 'x86_64'", version = "^1.13.1"},
]

The problem is that the marker-logic doesn't work: Poetry just installs the first of the two alternatives, and ignores the markes.

Am I doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/solverRelated to the dependency resolverkind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions