Skip to content

Poetry hangs when installing libraries depending on pyparsing on M1 Apple Silicon #6030

@fernandobperezm

Description

@fernandobperezm
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: macOS Monterrey 12.4, MacBook Pro (13-inch, M1, 2020)
  • Poetry version: 1.1.14
  • Link of a Gist with the contents of your pyproject.toml file: gist

Issue

Hello! I recently changed my intel mac with an M1 one.
In the process, I noticed that all my poetry installations hang (more than 900secs without finishing) if any library I'm installing depends on pyparsing (>=2.0.2,!=3.0.5).

The followings are the steps to reproduce my environment.

poetry new pytest-demo
cd pytest-demo 
pyenv local 3.9.7
poetry env use 3.9.7

Then I comment the pytest dependency in the default pyproject.toml file, it should look like the following:

[tool.poetry]
name = "pytest-demo"
version = "0.1.0"
description = ""
authors = ["Fernando Benjamin PEREZ MAURERA <[email protected]>"]

[tool.poetry.dependencies]
python = "^3.9"

# [tool.poetry.dev-dependencies]
# pytest = "^5.2"

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

Then I run the following command (using the -vvv) option:

poetry add pytest -vvv -D

The output of this command is the following

Using virtualenv: /Users/fernandobperezm/Library/Caches/pypoetry/virtualenvs/pytest-demo-nBp3JOZu-py3.9
PyPI: 152 packages found for pytest *
Using version ^7.1.2 for pytest

Updating dependencies
Resolving dependencies...
   1: fact: pytest-demo is 0.1.0
   1: derived: pytest-demo
   1: fact: pytest-demo depends on pytest (^7.1.2)
   1: fact: pytest-demo depends on pytest (^7.1.2)
   1: selecting pytest-demo (0.1.0)
   1: derived: pytest (>=7.1.2,<8.0.0)
PyPI: 1 packages found for pytest >=7.1.2,<8.0.0
   1: fact: pytest (7.1.2) depends on attrs (>=19.2.0)
   1: fact: pytest (7.1.2) depends on iniconfig (*)
   1: fact: pytest (7.1.2) depends on packaging (*)
   1: fact: pytest (7.1.2) depends on pluggy (>=0.12,<2.0)
   1: fact: pytest (7.1.2) depends on py (>=1.8.2)
   1: fact: pytest (7.1.2) depends on tomli (>=1.0.0)
   1: fact: pytest (7.1.2) depends on atomicwrites (>=1.0)
   1: fact: pytest (7.1.2) depends on colorama (*)
   1: selecting pytest (7.1.2)
   1: derived: colorama
   1: derived: atomicwrites (>=1.0)
   1: derived: tomli (>=1.0.0)
   1: derived: py (>=1.8.2)
   1: derived: pluggy (>=0.12,<2.0)
   1: derived: packaging
   1: derived: iniconfig
   1: derived: attrs (>=19.2.0)
PyPI: 43 packages found for colorama *
PyPI: 8 packages found for atomicwrites >=1.0
PyPI: 12 packages found for tomli >=1.0.0
PyPI: No release information found for py-0.8.0-alpha2, skipping
PyPI: No release information found for py-0.9.0, skipping
PyPI: No release information found for py-1.4.32.dev1, skipping
PyPI: 4 packages found for py >=1.8.2
PyPI: 4 packages found for pluggy >=0.12,<2.0
PyPI: 39 packages found for packaging *
PyPI: No release information found for iniconfig-0.0, skipping
PyPI: 5 packages found for iniconfig *
PyPI: 9 packages found for attrs >=19.2.0
   1: selecting py (1.11.0)
   1: selecting pluggy (1.0.0)
   1: selecting iniconfig (1.1.1)
   1: selecting attrs (21.4.0)
   1: selecting tomli (2.0.1)
   1: fact: packaging (21.3) depends on pyparsing (>=2.0.2,<3.0.5 || >3.0.5)
   1: selecting packaging (21.3)
   1: derived: pyparsing (>=2.0.2,!=3.0.5)

The installation then hangs and never ends (at least not after 900secs which is the max amount of time I've waited). I don't know if this is something related to my python version (3.9.7). This happened as well with other libraries, such as dask using poetry add "dask[complete]"

If you need more info by running other commands I'm more than happy to help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/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