poetry: poetry tries to install a version which is not present for the host OS
- 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 Catalina 10.15.1
- Poetry version: 1.0.5
- Link of pyproject.toml
Issue
For a project, needed to install umap-learn which in turn needs tbb package from pypi.
On running poetry add umap-learn, the installation failed with
[EnvCommandError] Command ['/Users/username/Downloads/Projects/env/bin/pip', 'install', '--no-deps', '-U', 'tbb==2020.0.133'] errored with the following return code 1, and output: ERROR: Could not find a version that satisfies the requirement tbb==2020.0.133 (from versions: 2018.0.4.1, 2019.0) ERROR: No matching distribution found for tbb==2020.0.133
It seems like the above package is not available for my host OS as when using pip install umap-learn, the version installed is 2019.0.
If I try to do poetry add command again, it tries to still update the package and fails.
the verbose mode gives `PyPI: 1 packages found for umap-learn >=0.4.1,<0.5.0 1: fact: umap-learn (0.4.1) depends on numpy (>=1.15) 1: fact: umap-learn (0.4.1) depends on scikit-learn (>=0.20) 1: fact: umap-learn (0.4.1) depends on scipy (>=1.0) 1: fact: umap-learn (0.4.1) depends on numba (>=0.46,<0.47 || >0.47) 1: fact: umap-learn (0.4.1) depends on tbb (>=2019.0) 1: selecting umap-learn (0.4.1) 1: derived: tbb (>=2019.0) 1: derived: numba (>=0.46,<0.47 || >0.47) 1: derived: scipy (>=1.0) 1: derived: scikit-learn (>=0.20) 1: derived: numpy (>=1.15) PyPI: 2 packages found for tbb >=2019.0 1: selecting cython (0.29.15) 1: fact: celery (4.4.0) depends on pytz (>0.0-dev) 1: fact: celery (4.4.0) depends on billiard (>=3.6.1,<4.0) 1: fact: celery (4.4.0) depends on kombu (>=4.6.7,<4.7) 1: fact: celery (4.4.0) depends on vine (1.3.0) 1: selecting celery (4.4.0) 1: derived: vine (1.3.0) 1: derived: kombu (>=4.6.7,<4.7) 1: derived: billiard (>=3.6.1,<4.0) 1: derived: pytz (>0.0-dev) 1: fact: azure-storage (0.36.0) depends on azure-common (>=1.1.5) 1: fact: azure-storage (0.36.0) depends on azure-nspkg (>=2.0.0) 1: fact: azure-storage (0.36.0) depends on cryptography () 1: fact: azure-storage (0.36.0) depends on python-dateutil () 1: fact: azure-storage (0.36.0) depends on requests () 1: selecting azure-storage (0.36.0) 1: derived: requests () 1: derived: python-dateutil () 1: derived: cryptography () 1: derived: azure-nspkg (>=2.0.0) 1: derived: azure-common (>=1.1.5) 1: fact: sklearn (0.0) depends on scikit-learn () 1: selecting sklearn (0.0) 1: selecting pymongo (3.8.0) 1: selecting configparser (3.7.0) 1: fact: tensorflow-hub (0.7.0) depends on numpy (>=1.12.0) 1: fact: tensorflow-hub (0.7.0) depends on six (>=1.10.0) 1: fact: tensorflow-hub (0.7.0) depends on protobuf (>=3.4.0) 1: selecting tensorflow-hub (0.7.0) 1: derived: protobuf (>=3.4.0) 1: derived: six (>=1.10.0) 1: fact: flask (1.1.1) depends on Werkzeug (>=0.15) 1: fact: flask (1.1.1) depends on Jinja2 (>=2.10.1) 1: fact: flask (1.1.1) depends on itsdangerous (>=0.24) 1: fact: flask (1.1.1) depends on click (>=5.1) 1: selecting flask (1.1.1) 1: derived: click (>=5.1) 1: derived: itsdangerous (>=0.24) 1: derived: Jinja2 (>=2.10.1) 1: derived: Werkzeug (>=0.15) 1: fact: numba (0.48.0) depends on llvmlite (>=0.31.0dev0,<0.32.0) 1: fact: numba (0.48.0) depends on numpy (>=1.15) 1: selecting numba (0.48.0) 1: derived: llvmlite (>=0.31.0dev0,<0.32.0) 1: fact: scipy (1.4.1) depends on numpy (>=1.13.3) 1: selecting scipy (1.4.1) 1: fact: scikit-learn (0.22.1) depends on numpy (>=1.11.0) 1: fact: scikit-learn (0.22.1) depends on scipy (>=0.17.0) 1: fact: scikit-learn (0.22.1) depends on joblib (>=0.11) 1: selecting scikit-learn (0.22.1) 1: derived: joblib (>=0.11) 1: selecting numpy (1.18.1) 1: selecting vine (1.3.0) 1: fact: kombu (4.6.7) depends on amqp (>=2.5.2,<2.6) 1: fact: kombu (4.6.7) depends on importlib-metadata (>=0.18) 1: selecting kombu (4.6.7) 1: derived: importlib-metadata (>=0.18) 1: derived: amqp (>=2.5.2,<2.6) 1: selecting billiard (3.6.2.0) 1: selecting pytz (2019.3) 1: fact: requests (2.22.0) depends on chardet (>=3.0.2,❤️.1.0) 1: fact: requests (2.22.0) depends on idna (>=2.5,<2.9) 1: fact: requests (2.22.0) depends on urllib3 (>=1.21.1,<1.25.0 || >1.25.0,<1.25.1 || >1.25.1,<1.26) 1: fact: requests (2.22.0) depends on certifi (>=2017.4.17) 1: selecting requests (2.22.0) 1: derived: certifi (>=2017.4.17) 1: derived: urllib3 (>=1.21.1,<1.25.0 || >1.25.0,<1.25.1 || >1.25.1,<1.26) 1: derived: idna (>=2.5,<2.9) 1: derived: chardet (>=3.0.2,❤️.1.0) 1: fact: python-dateutil (2.8.1) depends on six (>=1.5) 1: selecting python-dateutil (2.8.1) 1: fact: cryptography (2.8) depends on six (>=1.4.1) 1: fact: cryptography (2.8) depends on cffi (>=1.8,<1.11.3 || >1.11.3) 1: selecting cryptography (2.8) 1: derived: cffi (>=1.8,<1.11.3 || >1.11.3) 1: selecting azure-nspkg (3.0.2) 1: selecting azure-common (1.1.24) 1: fact: protobuf (3.11.3) depends on six (>=1.9) 1: selecting protobuf (3.11.3) 1: selecting six (1.14.0) 1: selecting click (7.0) 1: selecting itsdangerous (1.1.0) 1: fact: jinja2 (2.11.1) depends on MarkupSafe (>=0.23) 1: selecting jinja2 (2.11.1) 1: derived: MarkupSafe (>=0.23) 1: selecting werkzeug (1.0.0) 1: selecting llvmlite (0.31.0) 1: selecting joblib (0.14.1) 1: fact: importlib-metadata (1.5.0) depends on zipp (>=0.5) 1: selecting importlib-metadata (1.5.0) 1: derived: zipp (>=0.5) 1: fact: amqp (2.5.2) depends on vine (>=1.1.3,<5.0.0a1) 1: selecting amqp (2.5.2) 1: selecting certifi (2019.11.28) 1: selecting urllib3 (1.25.8) 1: selecting idna (2.8) 1: selecting chardet (3.0.4) 1: fact: cffi (1.14.0) depends on pycparser () 1: selecting cffi (1.14.0) 1: derived: pycparser (*) 1: selecting markupsafe (1.1.1) 1: selecting zipp (2.2.0) 1: selecting pycparser (2.19) 1: selecting tbb (2020.0.133) 1: Version solving took 0.279 seconds. 1: Tried 1 solutions.
Writing lock file
Package operations: 2 installs, 0 updates, 0 removals
- Installing tbb (2020.0.133)
[EnvCommandError] Command [‘/Users/username/Downloads/Projects/env/bin/pip’, ‘install’, ‘–no-deps’, ‘tbb==2020.0.133’] errored with the following return code 1, and output: ERROR: Could not find a version that satisfies the requirement tbb==2020.0.133 (from versions: 2018.0.4.1, 2019.0) ERROR: No matching distribution found for tbb==2020.0.133 `
Any help would be appreciated.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 10
- Comments: 15 (1 by maintainers)
@ShamrockLee maybe, you have another issue of some kind. Installing the latest pip inside an environment created with poetry does help with resolving the issue with opencv-python 4.3.0.36. I’ve tested it on Fedora, Ubuntu and Centos with Python 3.6.
I am also experiencing something similar. my Dockerfile
The pyproject.toml dependencies are
When building the dockerfile
opencv-python
as a transitive dependency cannot be found@lig Thanks for the solution, but it didn’t work for me (with poetry installed from the repo on NixOS) and one of my friend (with poetry installed from
get-poetry.py
and python3 from Anaconda).Can confirm the issue on Ubuntu 18.04. Doesn’t reproduce on Fedora 32.
It looks like it has something to do with this:
https://pypi.org/project/opencv-contrib-python/4.3.0.36/ (at the bottom of the page)
Ubuntu 18.04 Poetry version 1.0.9
Workaround
Run
Check
Now it works!