Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add editable not working on Win11 Python3.11 #7643

Open
4 tasks done
codeheart09 opened this issue Mar 13, 2023 · 5 comments
Open
4 tasks done

Add editable not working on Win11 Python3.11 #7643

codeheart09 opened this issue Mar 13, 2023 · 5 comments
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged

Comments

@codeheart09
Copy link

codeheart09 commented Mar 13, 2023

  • 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.

@codeheart09 codeheart09 added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Mar 13, 2023
@codeheart09
Copy link
Author

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)

@dimbleby
Copy link
Contributor

sounds duplicate #7574, please close

@codeheart09
Copy link
Author

@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/poetry.git@1.4 and also master but the issue persists - from what I get the #7574 is already merged, right?

@dimbleby
Copy link
Contributor

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.

@codeheart09
Copy link
Author

codeheart09 commented Mar 13, 2023

@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.

dimbleby added a commit to dimbleby/poetry that referenced this issue Jun 4, 2023
dimbleby added a commit to dimbleby/poetry that referenced this issue Jun 4, 2023
radoering pushed a commit to dimbleby/poetry that referenced this issue Jun 18, 2023
radoering referenced this issue Jun 18, 2023
cf python-poetry#7313, python-poetry#7643
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants