SolverProblem in Docker
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).
- Docker: python:3.8.0:
- Poetry version: 1.0.5:
- Link to Github with the contents of your pyproject.toml file:
Issue
Alright, I think I must be missing something here. I have a Dockerfile that starts from python:3.8.0, I install poetry
, then try to run poetry install
and get a SovlerProblemError
Traceback:
[SolverProblemError]
The current project's Python requirement (2.7.16) is not compatible with some of the required packages Python requirement:
- black requires Python >=3.6
Because black (19.10b0) requires Python >=3.6
and no versions of black match >19.10b0,<20.0, black is forbidden.
So, because grade depends on black (^19.10b0), version solving failed.
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/clikit/console_application.py", line 131, in run
status_code = command.handle(parsed_args, io)
File "/usr/local/lib/python3.8/site-packages/clikit/api/command/command.py", line 120, in handle
status_code = self._do_handle(args, io)
File "/usr/local/lib/python3.8/site-packages/clikit/api/command/command.py", line 171, in _do_handle
return getattr(handler, handler_method)(args, io, self)
File "/usr/local/lib/python3.8/site-packages/cleo/commands/command.py", line 92, in wrap_handle
return self.handle()
File "/usr/local/lib/python3.8/site-packages/poetry/console/commands/install.py", line 63, in handle
return_code = installer.run()
File "/usr/local/lib/python3.8/site-packages/poetry/installation/installer.py", line 74, in run
self._do_install(local_repo)
File "/usr/local/lib/python3.8/site-packages/poetry/installation/installer.py", line 225, in _do_install
ops = solver.solve(use_latest=whitelist)
File "/usr/local/lib/python3.8/site-packages/poetry/puzzle/solver.py", line 36, in solve
packages, depths = self._solve(use_latest=use_latest)
File "/usr/local/lib/python3.8/site-packages/poetry/puzzle/solver.py", line 190, in _solve
raise SolverProblemError(e)
Dockerfile:
FROM python:3.8.0
# First let's just get things updated.
RUN apt-get -y update --fix-missing && apt-get -y upgrade
# Dependancies
RUN apt-get install -y \
make \
gcc \
clang \
valgrind \
git \
build-essential \
software-properties-common \
wget \
curl
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
# Install grade
RUN mkdir /app/
COPY . /app/
# Defaults
WORKDIR /app/
RUN python -m pip install --upgrade pip \
&& python -m pip install poetry \
&& poetry config virtualenvs.create false \
&& poetry -V \
&& poetry install -vvv
pyproject.toml
[tool.poetry]
name = "grade"
version = "2.1.5"
description = "a package focused on autograding"
authors = ["Tom <info@tomhoward.codes>"]
license = "AGPL-3.0"
packages = [
{ include = "grade" }
]
[tool.poetry.dependencies]
python = "^3.6"
click = "^7.0"
[tool.poetry.dev-dependencies]
Sphinx = "^2.4.1"
coverage = "^5.0.3"
black = "^19.10b0"
python-semantic-release = "^4.10.0"
toml = "^0.10.0"
[tool.semantic_release]
version_variable = "pyproject.toml:version"
commit_message = "build: version bump to v${version}"
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
What problems does Docker really solve? - DEV Community
The reason is that docker solves some common problems that have been around for quite a while in software development. CONTEXT.
Read more >Which Problems Can Docker Help Me Solve? - vsupalov.com
But what practical problems can it help solve? Here's a non-exhaustive list of problems which can be made less painful with the help...
Read more >What problems does Docker solve? - Medium
Docker promises to solve those issues, as the official documentation says: “Docker is an open platform for developing, shipping, and running applications” ...
Read more >What are application containers and what problems do they ...
Docker's container technology solved these problems by innovating in two key areas: application packaging; process isolation and management.
Read more >What problem does Docker (not the containers) exactly solve?
First came the Operating System. It allowed software to share hardware. Despite the best efforts of designers, OSes did not sufficiently isolate users, ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi, can you attach
pyproject.toml
here? Also you should try to addpoetry env use 3.8
in your Dockerfile.@finswimmer that worked! I tried to recreate my bug for a while, it looks like something was broken in my
.venv
, which is super confusing as I cannot even find python2 on my system at all… either way, I’m good now, thanks for all the help!