python-poetry / python-poetry/poetry

Add editable not working on Win11 Python3.11

Open
#7,643 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

  • Poetry version: 1.4.0
  • Python version: 3.11.2
  • OS version and name: Windows 11 Pro
  • pyproject.toml: see bellow
  • 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

I have two local packages, pack-1 and pack-2. When I add the pack-1 to the pack-2 (poetry add --editable ../pack-1) the pack-1 is added to the pyproject.toml of the pack-2, but when I import the module pack_1 (in any of the pack-2 files) I have the error No module named 'pack_1'.

pack-1 pyproject.toml:

[tool.poetry]
name = "pack-1"
version = "0.1.0"
description = ""
authors = [""]
readme = "README.md"
packages = [{include = "pack_1"}]

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

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

pack-2 pyproject.toml:

[tool.poetry]
name = "pack-2"
version = "0.1.0"
description = ""
authors = [""]
readme = "README.md"
packages = [{include = "pack_2"}]

[tool.poetry.dependencies]
python = "^3.11"
pack-1 = {path = "../pack-1", develop = true}

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

In MacOS the expected behavior (the module being available to pack-2) is successful. I've been only experiencing this on Windows 11.

Let me know if you need any more info.

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

Reproduce the editable dependency setup with pack-1 and pack-2 using poetry add --editable ../pack-1 on Windows 11 and compare it with macOS. Trace Poetry's editable path-dependency installation and verify that importing pack_1 from pack-2 succeeds; the issue provides no specific files or tests to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.