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.

SolverProblemError when installing aiohttp

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

Issue

Poetry incorrectly identifies idna-ssl to be a dependency of aiohttp when the required python is 3.7. Here is the result of poetry lock -vvv.

Here is a Dockerfile which can be used together with the linked pyproject.toml file to reproduce the error:

FROM python:3.7.0b5-alpine
RUN apk add --no-cache curl \
 && curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python3
ADD pyproject.toml .
RUN poetry lock -vvv

The setup.py of aiohttp only includes the dependency on idna-ssl for versions lower than 3.7:

if sys.version_info < (3, 7):
    install_requires.append('idna-ssl>=1.0')

install_requires is later on passed to setuptools.setup(...).

idna-ssl indeed only supports python versions <3.7 but it should not be included as a dependency to begin with.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
Yanpascommented, Dec 27, 2018

Had a problem with multidict:

 $ poetry update
Updating dependencies
Resolving dependencies... (0.2s)


Package operations: 7 installs, 0 updates, 0 removals

Writing lock file

  - Installing multidict (4.5.2)

[EnvCommandError]
Command ['pip', 'install', '--no-deps', 'multidict==4.5.2'] errored with
the following output:
Collecting multidict==4.5.2
  Could not find a version that satisfies the requirement multidict==4.5.
2 (from versions: 1.0.0a0, 1.0.1, 1.0.2, 1.0.3, 1.1.0b1, 1.1.0b2, 1.1.0b4
, 1.1.0b5, 1.1.0b6, 1.1.0b7, 1.1.0b8, 1.1.0, 1.2.0, 1.2.1, 1.2.2, 2.0.0,
2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6, 3.0.0, 3.1.0, 3.1
.1, 3.1.3a0, 3.1.3, 3.1.4a1, 3.1.4a2, 3.1.4a3, 3.2.0a3, 3.2.0, 3.2.1a0, 3
.3.0, 3.3.1)
No matching distribution found for multidict==4.5.2

After rm -rf ~/.cache/pypoetry/ the error is gone.

toml file is simple:

[tool.poetry]
name = "xxx"
version = "0.1.0"
description = ""

[tool.poetry.dependencies]
python = "^3.6"
peewee = "^3.8"
aiohttp = "~3.5"

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

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

1reaction
sdispatercommented, Jun 30, 2018

And it seems someone already opened a PR: https://github.com/aio-libs/aiohttp/pull/3114

Read more comments on GitHub >

github_iconTop Results From Across the Web

SolverProblemError when installing aiohttp · Issue #274 - GitHub
I am on the latest Poetry version. I have searched the issues of this repo and believe that this is not a duplicate....
Read more >
poetry install | SolverProblemError Because my_project ...
The problem with your current pyproject.toml is, that you declare built-in packages as dependencies, like os, pathlib, string and others. This ...
Read more >
So, because lyer depends on both aiohttp (^3.7.3) and discord ...
1), version solving failed. Elimz. [SolverProblemError]
Read more >
Welcome to AIOHTTP — aiohttp 3.7.4.post0 documentation
Welcome to AIOHTTP¶. Asynchronous HTTP Client/Server for asyncio and Python. Current version is 3.7.4.post0. Key Features¶. Supports both Client and HTTP ...
Read more >
Update Packages in Python Poetry - YippeeCode
First step is to find out what packages are currently installed in your system. Then, find the ones that are outdated. You can...
Read more >

github_iconTop Related Medium Post

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