Add editable not working on Win11 Python3.11
- Poetry version: 1.4.0
- Python version: 3.11.2
- OS version and name: Windows 11 Pro
- pyproject.toml: see bellow
- [x] I am on the latest stable Poetry version, installed using a recommended method.
- [x] I have searched the issues of this repo and believe that this is not a duplicate.
- [x] I have consulted the FAQ and blog for any relevant entries or release notes.
- [x] If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption) 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.
Log output for the add command with -vvv:
...
1: derived: oack-1 (0.1.0) @ file:///C:/Users/Usu%C3%A1rio/............./pack-1
...
• Installing oack-1 (0.1.0 C:/Users/Usuário/............./pack-1)
sounds duplicate #7574, please close
@dimbleby , don't seem to be duplicate. I installed poetry via (Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py - --git https://github.com/python-poetry/[email protected] and also master but the issue persists - from what I get the #7574 is already merged, right?
fair enough
I don't use poetry on windows so can't offer further help. The only other idea that suggests itself looking at your log is that maybe the non-ascii username in the path might have confused something along the way, but it is only a guess.
@dimbleby Yes, I passed both python and poetry to C:\Program Files (and the project to outside the user dir) and everything worked as expected. Having it under utf-8/accentuated characters makes the issue happen.