question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Poetry cannot choose orjson wheel for M1 macos

See original GitHub issue
  • 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

Poetry is unable to choose the orjson wheel for M1 macos i.e. https://files.pythonhosted.org/packages/74/71/5024229c3e6ca20ba069fd4428e322c3e038a881320491e7b9fe98a2df88/orjson-3.8.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl when orjson 3.8 is specified in pyproject.toml dependencies, and instead goes for the plain tar.gz (https://files.pythonhosted.org/packages/0a/de/282b8ca582b63e39e9ef7069c47c7be617d201e47ae435da851f7ffe61d1/orjson-3.8.0.tar.gz) and tries to build it.

Meanwhile if installed with pip, the proper wheel (URL mentioned above) is used:

$ python3 -m pip install orjson
Collecting orjson
  Downloading orjson-3.8.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (483 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 483.2/483.2 kB 8.2 MB/s eta 0:00:00
Installing collected packages: orjson
Successfully installed orjson-3.8.0

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
neersightedcommented, Oct 5, 2022

I’m unable to reproduce this on a M1 mac using Poetry 1.2.1. When I install using the pyproject provided or poetry add orjson, I end up with orjson-3.8.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl as expected.

I suspect this issue is external to Poetry – maybe your Python is not reporting the correct compatible tags. python -m pip install packaging; python3 -c 'import packaging.tags; list(packaging.tags.compatible_tags())' may be informative if you run it with your problematic Python; however, as I cannot reproduce this in a clean macOS VM with a Homebrew-built Python, I am closing this for now.

If you can reproduce this, the output of the above command plus details on how your Python is built/installed will be necessary.

0reactions
dimblebycommented, Oct 5, 2022

since neither of you has provided any output showing either what you are doing or what the result is, it’s going to be hard for anyone to offer any help

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to install orjson 3.3.0 on macOS 12.2.1 with Apple M1 ...
I am trying to install orjson==3.3.0 on my MacBook Pro with Apple M1 Pro chip running macOS Monterey 12.2.1. Python version: 3.8.9.
Read more >
orjson - PyPI
orjson is a fast, correct JSON library for Python. ... amd64 and aarch64 wheels for macOS, and amd64 wheels for Windows. orjson does...
Read more >
ERROR: Failed building wheel for cryptography
i get this after running python3 -m pip install --upgrade homeassistant in the correct container: error: can't find Rust compiler If you areΒ ......
Read more >
Package List β€” Spack 0.20.0.dev0 documentation
autoconf, perl-clone-choose, py-virtualenv-clone ... hip, hip-rocclr, rocm-gdb; Run Dependencies: py-wheel; Description: llvm openmp compiler from AMD.
Read more >
note: this error originates from a subprocess, and is likely not a ...
ERROR: Failed building wheel for sentencepiece Running setup.py clean for ... apple silicon m1 pro ,mac os 13.0 python version: 3.9 pip version...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found