poetry: Poetry doesn't install the right platform wheel but pip does
- Poetry version: version 1.4.1
- Python version: 3.8.10
- OS version and name: macOS 13.2.1
- pyproject.toml: https://gist.github.com/Praful932/4b9d108270fd955631d286599498d7e5
- 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
Unable to install pytorch wheel(https://download.pytorch.org/whl/cpu/torch-2.0.0-cp38-none-macosx_11_0_arm64.whl) using `poetry add url -vvv` raises `AssertionError` command but able to do it using pip install urlCommand ran : poetry add https://download.pytorch.org/whl/cpu/torch-2.0.0-cp38-none-macosx_11_0_arm64.whl -vvv
output
Loading configuration file /Users/praful932/Library/Application Support/pypoetry/config.toml
Loading configuration file /Users/praful932/Library/Application Support/pypoetry/auth.toml
Using virtualenv: /Users/praful932/Library/Caches/pypoetry/virtualenvs/temp-eeUhVPg0-py3.8
[urllib3.connectionpool] Starting new HTTPS connection (1): download.pytorch.org:443
[urllib3.connectionpool] https://download.pytorch.org:443 "GET /whl/cpu/torch-2.0.0-cp38-none-macosx_11_0_arm64.whl HTTP/1.1" 200 55830206
Updating dependencies
Resolving dependencies...
1: fact: temp is 0.1.0
1: derived: temp
[urllib3.connectionpool] Starting new HTTPS connection (1): download.pytorch.org:443
[urllib3.connectionpool] https://download.pytorch.org:443 "GET /whl/cpu/torch-2.0.0-cp38-none-macosx_11_0_arm64.whl HTTP/1.1" 200 55830206
1: fact: temp depends on torch (2.0.0)
1: selecting temp (0.1.0)
1: derived: torch (2.0.0) @ https://download.pytorch.org/whl/cpu/torch-2.0.0-cp38-none-macosx_11_0_arm64.whl
1: fact: torch (2.0.0) depends on filelock (*)
1: fact: torch (2.0.0) depends on typing-extensions (*)
1: fact: torch (2.0.0) depends on sympy (*)
1: fact: torch (2.0.0) depends on networkx (*)
1: fact: torch (2.0.0) depends on jinja2 (*)
1: selecting torch (2.0.0 https://download.pytorch.org/whl/cpu/torch-2.0.0-cp38-none-macosx_11_0_arm64.whl)
1: derived: jinja2
1: derived: networkx
1: derived: sympy
1: derived: typing-extensions
1: derived: filelock
Source (PyPI): Getting info for jinja2 (3.1.2) from PyPI
[keyring.backend] Loading KWallet
[keyring.backend] Loading SecretService
[keyring.backend] Loading Windows
[keyring.backend] Loading chainer
[keyring.backend] Loading libsecret
[keyring.backend] Loading macOS
Creating new session for pypi.org
[urllib3.connectionpool] Starting new HTTPS connection (1): pypi.org:443
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/jinja2/3.1.2/json HTTP/1.1" 200 2264
[filelock] Attempting to acquire lock 4557011888 on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/c/1/1/5/a/c115af6e1dcb6f8536a6040907a266f2edede58de741819d6eccc5ee.lock
[filelock] Lock 4557011888 acquired on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/c/1/1/5/a/c115af6e1dcb6f8536a6040907a266f2edede58de741819d6eccc5ee.lock
[filelock] Attempting to release lock 4557011888 on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/c/1/1/5/a/c115af6e1dcb6f8536a6040907a266f2edede58de741819d6eccc5ee.lock
[filelock] Lock 4557011888 released on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/c/1/1/5/a/c115af6e1dcb6f8536a6040907a266f2edede58de741819d6eccc5ee.lock
1: fact: jinja2 (3.1.2) depends on MarkupSafe (>=2.0)
1: selecting jinja2 (3.1.2)
1: derived: MarkupSafe (>=2.0)
Source (PyPI): Getting info for networkx (3.0) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/networkx/3.0/json HTTP/1.1" 200 2534
[filelock] Attempting to acquire lock 4556666048 on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/4/c/9/b/8/4c9b8dedb28235c480d6d21b520288b17de689c604588cbdc29e014d.lock
[filelock] Lock 4556666048 acquired on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/4/c/9/b/8/4c9b8dedb28235c480d6d21b520288b17de689c604588cbdc29e014d.lock
[filelock] Attempting to release lock 4556666048 on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/4/c/9/b/8/4c9b8dedb28235c480d6d21b520288b17de689c604588cbdc29e014d.lock
[filelock] Lock 4556666048 released on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/4/c/9/b/8/4c9b8dedb28235c480d6d21b520288b17de689c604588cbdc29e014d.lock
1: selecting networkx (3.0)
Source (PyPI): Getting info for sympy (1.11.1) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/sympy/1.11.1/json HTTP/1.1" 200 6202
[filelock] Attempting to acquire lock 4556667344 on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/5/3/0/d/d/530dd3da3a9a70ad3bfb834b3c6ca1053260d10410e7b6b2de33e8fe.lock
[filelock] Lock 4556667344 acquired on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/5/3/0/d/d/530dd3da3a9a70ad3bfb834b3c6ca1053260d10410e7b6b2de33e8fe.lock
[filelock] Attempting to release lock 4556667344 on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/5/3/0/d/d/530dd3da3a9a70ad3bfb834b3c6ca1053260d10410e7b6b2de33e8fe.lock
[filelock] Lock 4556667344 released on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/5/3/0/d/d/530dd3da3a9a70ad3bfb834b3c6ca1053260d10410e7b6b2de33e8fe.lock
1: fact: sympy (1.11.1) depends on mpmath (>=0.19)
1: selecting sympy (1.11.1)
1: derived: mpmath (>=0.19)
Source (PyPI): Getting info for typing-extensions (4.5.0) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/typing-extensions/4.5.0/json HTTP/1.1" 200 3610
[filelock] Attempting to acquire lock 4556819568 on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/e/e/f/c/f/eefcf8c66c1c8510de6489973eed67d1034fe367f6ef85a47029e4d2.lock
[filelock] Lock 4556819568 acquired on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/e/e/f/c/f/eefcf8c66c1c8510de6489973eed67d1034fe367f6ef85a47029e4d2.lock
[filelock] Attempting to release lock 4556819568 on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/e/e/f/c/f/eefcf8c66c1c8510de6489973eed67d1034fe367f6ef85a47029e4d2.lock
[filelock] Lock 4556819568 released on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/e/e/f/c/f/eefcf8c66c1c8510de6489973eed67d1034fe367f6ef85a47029e4d2.lock
Source (PyPI): No dependencies found, downloading archives
Source (PyPI): Downloading wheel: typing_extensions-4.5.0-py3-none-any.whl
Creating new session for files.pythonhosted.org
[urllib3.connectionpool] Starting new HTTPS connection (1): files.pythonhosted.org:443
[urllib3.connectionpool] https://files.pythonhosted.org:443 "GET /packages/31/25/5abcd82372d3d4a3932e1fa8c3dbf9efac10cc7c0d16e78467460571b404/typing_extensions-4.5.0-py3-none-any.whl HTTP/1.1" 200 27736
[filelock] Attempting to acquire lock 4556313552 on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/d/0/b/f/a/d0bfa498e2140837b4c098bd13b5c0cdfa870ed7c47c1a5647dd1f09.lock
[filelock] Lock 4556313552 acquired on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/d/0/b/f/a/d0bfa498e2140837b4c098bd13b5c0cdfa870ed7c47c1a5647dd1f09.lock
[filelock] Attempting to release lock 4556313552 on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/d/0/b/f/a/d0bfa498e2140837b4c098bd13b5c0cdfa870ed7c47c1a5647dd1f09.lock
[filelock] Lock 4556313552 released on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/d/0/b/f/a/d0bfa498e2140837b4c098bd13b5c0cdfa870ed7c47c1a5647dd1f09.lock
1: selecting typing-extensions (4.5.0)
Source (PyPI): Getting info for filelock (3.10.7) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/filelock/3.10.7/json HTTP/1.1" 200 1577
[filelock] Attempting to acquire lock 4556819232 on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/e/b/d/5/9/ebd59aaa29cd0a3f3f709f08409de6a2aaaf933da7a9d1788b9375cb.lock
[filelock] Lock 4556819232 acquired on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/e/b/d/5/9/ebd59aaa29cd0a3f3f709f08409de6a2aaaf933da7a9d1788b9375cb.lock
[filelock] Attempting to release lock 4556819232 on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/e/b/d/5/9/ebd59aaa29cd0a3f3f709f08409de6a2aaaf933da7a9d1788b9375cb.lock
[filelock] Lock 4556819232 released on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/e/b/d/5/9/ebd59aaa29cd0a3f3f709f08409de6a2aaaf933da7a9d1788b9375cb.lock
1: selecting filelock (3.10.7)
Source (PyPI): Getting info for markupsafe (2.1.2) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/markupsafe/2.1.2/json HTTP/1.1" 200 9246
[filelock] Attempting to acquire lock 4556375184 on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/c/7/a/0/a/c7a0a7b25dab759860017c3d7ac16761f15e5d67ed9cd4d641f322c8.lock
[filelock] Lock 4556375184 acquired on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/c/7/a/0/a/c7a0a7b25dab759860017c3d7ac16761f15e5d67ed9cd4d641f322c8.lock
[filelock] Attempting to release lock 4556375184 on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/c/7/a/0/a/c7a0a7b25dab759860017c3d7ac16761f15e5d67ed9cd4d641f322c8.lock
[filelock] Lock 4556375184 released on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/c/7/a/0/a/c7a0a7b25dab759860017c3d7ac16761f15e5d67ed9cd4d641f322c8.lock
Source (PyPI): No dependencies found, downloading archives
Source (PyPI): Downloading wheel: MarkupSafe-2.1.2-cp310-cp310-macosx_10_9_universal2.whl
[urllib3.connectionpool] https://files.pythonhosted.org:443 "GET /packages/37/b2/6f4d5cac75ba6fe9f17671304fe339ea45a73c5609b5f5e652aa79c915c8/MarkupSafe-2.1.2-cp310-cp310-macosx_10_9_universal2.whl HTTP/1.1" 200 17750
[filelock] Attempting to acquire lock 4556375472 on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/c/9/3/3/7/c93371ad39c239829c1ca059c0e32450ecbf5170f6cb2a73df3aeada.lock
[filelock] Lock 4556375472 acquired on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/c/9/3/3/7/c93371ad39c239829c1ca059c0e32450ecbf5170f6cb2a73df3aeada.lock
[filelock] Attempting to release lock 4556375472 on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/c/9/3/3/7/c93371ad39c239829c1ca059c0e32450ecbf5170f6cb2a73df3aeada.lock
[filelock] Lock 4556375472 released on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/c/9/3/3/7/c93371ad39c239829c1ca059c0e32450ecbf5170f6cb2a73df3aeada.lock
1: selecting markupsafe (2.1.2)
Source (PyPI): Getting info for mpmath (1.3.0) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/mpmath/1.3.0/json HTTP/1.1" 200 4085
[filelock] Attempting to acquire lock 4556377920 on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/7/9/a/9/7/79a9773bc64f300957fb6c9b034d9f3e40b05702505329effa68d5e8.lock
[filelock] Lock 4556377920 acquired on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/7/9/a/9/7/79a9773bc64f300957fb6c9b034d9f3e40b05702505329effa68d5e8.lock
[filelock] Attempting to release lock 4556377920 on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/7/9/a/9/7/79a9773bc64f300957fb6c9b034d9f3e40b05702505329effa68d5e8.lock
[filelock] Lock 4556377920 released on /Users/praful932/Library/Caches/pypoetry/cache/repositories/PyPI/_http/7/9/a/9/7/79a9773bc64f300957fb6c9b034d9f3e40b05702505329effa68d5e8.lock
1: selecting mpmath (1.3.0)
1: Version solving took 16.848 seconds.
1: Tried 1 solutions.
Finding the necessary packages for the current system
[urllib3.connectionpool] Starting new HTTPS connection (1): download.pytorch.org:443
[urllib3.connectionpool] https://download.pytorch.org:443 "GET /whl/cpu/torch-2.0.0-cp38-none-macosx_11_0_arm64.whl HTTP/1.1" 200 55830206
Package operations: 1 install, 0 updates, 0 removals, 7 skipped
• Installing filelock (3.10.7): Pending...
• Installing filelock (3.10.7): Skipped for the following reason: Already installed
• Installing typing-extensions (4.5.0): Pending...
• Installing typing-extensions (4.5.0): Skipped for the following reason: Already installed
• Installing networkx (3.0): Pending...
• Installing networkx (3.0): Skipped for the following reason: Already installed
• Installing sympy (1.11.1): Pending...
• Installing sympy (1.11.1): Skipped for the following reason: Already installed
• Installing torch (2.0.0 https://download.pytorch.org/whl/cpu/torch-2.0.0-cp38-none-macosx_11_0_arm64.whl): Pending...
• Installing torch (2.0.0 https://download.pytorch.org/whl/cpu/torch-2.0.0-cp38-none-macosx_11_0_arm64.whl): Failed
Stack trace:
4 ~/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/poetry/installation/executor.py:272 in _execute_operation
270│
271│ try:
→ 272│ result = self._do_execute_operation(operation)
273│ except EnvCommandError as e:
274│ if e.e.returncode == -2:
3 ~/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/poetry/installation/executor.py:374 in _do_execute_operation
372│ return 0
373│
→ 374│ result: int = getattr(self, f"_execute_{method}")(operation)
375│
376│ if result != 0:
2 ~/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/poetry/installation/executor.py:494 in _execute_install
492│
493│ def _execute_install(self, operation: Install | Update) -> int:
→ 494│ status_code = self._install(operation)
495│
496│ self._save_url_reference(operation)
1 ~/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/poetry/installation/executor.py:530 in _install
528│ elif package.source_type == "url":
529│ assert package.source_url is not None
→ 530│ archive = self._download_link(operation, Link(package.source_url))
531│ else:
532│ archive = self._download(operation)
AssertionError
at ~/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/poetry/installation/executor.py:734 in _download_link
730│ # to the original archive.
731│ archive = self._chef.get_cached_archive_for_link(link, strict=False)
732│ # 'archive' can at this point never be None. Since we previously downloaded
733│ # an archive, we now should have something cached that we can use here
→ 734│ assert archive is not None
735│
736│ if archive.suffix != ".whl":
737│ message = (
738│ f" • {self.get_operation_message(operation)}:"
• Installing jinja2 (3.1.2): Pending...
• Installing jinja2 (3.1.2): Skipped for the following reason: Already installed
• Installing mpmath (1.3.0): Pending...
• Installing mpmath (1.3.0): Skipped for the following reason: Already installed
• Installing markupsafe (2.1.2): Pending...
• Installing markupsafe (2.1.2): Skipped for the following reason: Already installed```
</details>
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15 (7 by maintainers)
I am in Ubuntu 22.04, python 3.10.6 and poetry 1.4.2. I observe similar behavior when installing torch. Poetry does not install all cuda dependencies, like
nvidia-cudnn-cu11
and many others, but pip does. I observe the same behavior with poetry 1.3.2 (missing dependencies for the platform).I tried to find the wheel tags with (I chose a name that is suitable for my platflorm?)
My platform tags:
Does this make sense? This does not happen to me with
torch==1.13.1
. Why would the packages be different? Thanks.super, please close
(the other issue mentioned in this thread is quite different, let’s not allow this one to be hijacked)