python-poetry / python-poetry/poetry

Missing locale dev dependencies are reported although installend without dev

Open
#10,461 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/bug status/triage
Dominant language
Python
Stars
34.3k
Forks
2.5k
Avg merge
2d 19h
Merged PRs (30d)
30

Description

Description

I have a poetry project which is using local python packages as dev dependencies, which therefore are part of the lock file. When I deploy the project using docker, these dev dependencies folders are ofc missing. This leads to a continues error message about the missing packages, although I don't need them in the container and also do not install that group at all.

This sounds like primary an inconvenience, but it also messed with execution of poetry commands using poethepoet. See this docker file on how we setup the container.

FROM python:3.11-slim AS base
ENV TZ=Europe/Berlin \
    VIRTUAL_ENV=/app/.venv \
    PATH="/app/.venv/bin:$PATH" \
    PYTHONPATH="/app:$PYTHONPATH" \
    DJANGO_STATIC_ROOT="/app/static" \
    DOMAIN_NAME="127.0.0.1" \
    DEBIAN_FRONTEND=noninteractive\
    POETRY_VIRTUALENVS_IN_PROJECT=1 \
    POETRY_NO_INTERACTION=1 \
    POETRY_VIRTUALENVS_CREATE=1

RUN apt-get update && apt-get upgrade -y && apt-get install -y \
    nano \
    tzdata \
    gettext 
RUN pip install poetry
WORKDIR /app
COPY pyproject.toml poetry.lock /app/
RUN poetry install --no-root --without dev
COPY . .
RUN poetry sync --only main

I did not test this if you use the build artifacts for the actual deployment, maybe this would circumvent this issue.

Workarounds

before running poetry sync ... run a poetry remove ... of the dev dependencies

Poetry Installation Method

pip

Operating System

Ubuntu 24.04.2

Poetry Version

2.0.1

Poetry Configuration
Path /app/pytest-history for pytest-history does not exist
cache-dir = "/root/.cache/pypoetry"
data-dir = "/root/.local/share/pypoetry"
installer.max-workers = null
installer.no-binary = null
installer.only-binary = null
installer.parallel = true
installer.re-resolve = true
keyring.enabled = true
python.installation-dir = "{data-dir}/python"  # /root/.local/share/pypoetry/python
requests.max-retries = 0
solver.lazy-wheel = true
system-git-client = false
virtualenvs.create = true
virtualenvs.in-project = true
virtualenvs.options.always-copy = false
virtualenvs.options.no-pip = false
virtualenvs.options.system-site-packages = false
virtualenvs.path = "{cache-dir}/virtualenvs"  # /root/.cache/pypoetry/virtualenvs
virtualenvs.prompt = "{project_name}-py{python_version}"
virtualenvs.use-poetry-python = false
Python Sysconfig

default config as provided by python:3.11-slim docker container

Example pyproject.toml
[tool.poetry]
name = "poetry-report-example"
version = "0.1.0"
description = ""
authors = ["Christian Günther <cgu@codemanufaktur.com>"]
readme = "README.md"


[tool.poetry.dependencies]
python = "^3.11"
pandas = "^2.3.0"


[tool.poetry.group.dev.dependencies]
my-local-dev-package = {path = "my-local-dev-package"}

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Poetry Runtime Logs
poetry-runtime.log

Path /app/pytest-history for pytest-history does not exist
Loading configuration file /root/.config/pypoetry/config.toml
Using virtualenv: /app/.venv
Checking keyring availability: Checking if keyring is available
[keyring:keyring.backend] Loading KWallet
[keyring:keyring.backend] Loading SecretService
[keyring:keyring.backend] Loading Windows
[keyring:keyring.backend] Loading chainer
[keyring:keyring.backend] Loading libsecret
[keyring:keyring.backend] Loading macOS
Backend 'fail Keyring' is not suitable
No valid keyring backend was found
Unavailable
Installing dependencies from lock file

Finding the necessary packages for the current system
Path /app/pytest-history for pytest-history does not exist

Package operations: 0 installs, 0 updates, 0 removals, 6 skipped

  • Installing numpy (2.3.1): Pending...
  • Installing numpy (2.3.1): Skipped for the following reason: Already installed
  • Installing pandas (2.3.1): Pending...
  • Installing pandas (2.3.1): Skipped for the following reason: Already installed
  • Installing python-dateutil (2.9.0.post0): Pending...
  • Installing python-dateutil (2.9.0.post0): Skipped for the following reason: Already installed
  • Installing pytz (2025.2): Pending...
  • Installing pytz (2025.2): Skipped for the following reason: Already installed
  • Installing six (1.17.0): Pending...
  • Installing six (1.17.0): Skipped for the following reason: Already installed
  • Installing tzdata (2025.2): Pending...
  • Installing tzdata (2025.2): Skipped for the following reason: Already installed

Installing the current project: poetry-report-example (0.1.0)

  • Building package poetry-report-example in editable mode
Paste the output of 'poetry -vvv <command>', over this line.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Dockerfile commands, pyproject.toml, and poetry.lock from the report, reproducing the install with the local package in the dev group and deployment without dev dependencies. Trace the dependency checks during poetry install --without dev and poetry sync --only main; done means excluded local dev packages no longer produce missing-package errors or interfere with Poetry commands.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.