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

poetry breaks itself in cmd. Also doesn't work in pycharm. #10201

Open
joekazama opened this issue Feb 19, 2025 · 3 comments
Open

poetry breaks itself in cmd. Also doesn't work in pycharm. #10201

joekazama opened this issue Feb 19, 2025 · 3 comments
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged

Comments

@joekazama
Copy link

Description

on installing poetry it worked for a second... and then it didn't. using python 3.13. windows 11.
At first it gives output:
C:\Users\mofog\AppData\Roaming\pypoetry\venv\Lib\site-packages>poetry
Poetry (version 2.1.1)

...
\poetry --version
Poetry (version 2.1.1)

then it just breaks a few commands later in the same session.

The latest version (2.1.1) is already installed.
PS C:\Users\redacted\AppData\Roaming\pypoetry\venv\Lib\site-packages> poetry --version
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\Users\mofog\AppData\Roaming\Python\Scripts\poetry.exe_main
.py", line 4, in


tried adding to Pycharm through local interpreter.
adding through pip gave an inability error.
adding through explicit path to poetry.exe gave error:
ModuleNotFoundError: No module named 'poetry


i'm sorry but I'm incredibly frustrated with poetry and i have to use it for work.

Workarounds

no.

Poetry Installation Method

other

Operating System

windows 11

Poetry Version

2.1.1

Poetry Configuration

poetry config --list
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\mofog\AppData\Roaming\Python\Scripts\poetry.exe\__main__.py", line 4, in <module>
    from poetry.console.application import main
ModuleNotFoundError: No module named 'poetry'

Python Sysconfig

sysconfig.log
Paste the output of 'python -m sysconfig', over this line.

Example pyproject.toml

Poetry Runtime Logs

poetry -vvv config --list
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\Users\mofog\AppData\Roaming\Python\Scripts\poetry.exe_main
.py", line 4, in
from poetry.console.application import main
ModuleNotFoundError: No module named 'poetry'

@joekazama joekazama added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Feb 19, 2025
@joekazama
Copy link
Author

thanks for the links. they were insightful.
my poetry did install into Roaming not LocalApp.
I used python from python.org, not Microsoft store. Its installation is in C:...\AppData\Local\Programs\Python\Python313
Pycharm's local interpreter setting has Poetry as an option, but gave the error above, (ModuleNotFoundError: No module named 'poetry')

it does all seem to be an environment variable issue or poetry location issue.
where is poetry 'supposed' to be installed?

@abn
Copy link
Member

abn commented Feb 22, 2025

As described in python-poetry/install.python-poetry.org#83 (comment) this is more to do what what Python tells Poetry installer where to install the script.

I'd suggest you try to install Poetry using pipx maybe?

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