-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
ModuleNotFoundError: No module named 'cleo' #3071
Comments
$ poetry -vvv
Traceback (most recent call last):
File "/Users/username/.poetry/bin/poetry", line 12, in <module>
from poetry.console import main
File "/Users/username/.poetry/lib/poetry/console/__init__.py", line 1, in <module>
from .application import Application
File "/Users/username/.poetry/lib/poetry/console/application.py", line 3, in <module>
from cleo import Application as BaseApplication
ModuleNotFoundError: No module named 'cleo' |
I needed to use Poetry soon and re-installed it. python get-poetry.py --uninstall
python get-poetry.py The error has gone. I hope this helps other people. |
Same here |
I had to do the same thing after adding python 3.9 to my pyenv and update poetry, re-install was the only thing that would do it. |
I had the same problem after updating to python 3.9 but the issue went away after "pip install --user poetry". Note that I use python through pyenv. |
Of course you'll need the file as such curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - |
This still happens |
I'm getting this error running ubuntu all of a sudden |
I'm getting the same after using: |
For me, changing the python version back to
|
Ah ok I'll give that shot. I've been using the python:slim container which I believe is on 3.9.5 |
Looks like that fixed it! Thanks @tomjohnburton |
I use python with pyenv, and experienced the same issue if I tried to run poetry with Python 3.10. I fixed it with
Then I manually edited ~/.poetry/bin/poetry to use python 3.9.9 all the time:
Seems like a hack, and there is maybe a bug in poetry if it's run with Python 3.10? |
@anpr I struggled to get this working on Python 3.10 too. The following worked:
|
@ben-hampson Same for me. All of a sudden my poetry also stopped working, I was running system update on arch at the time and it updated python from 3.9 to 3.10 and I think this was the reason why it stopped working. I installed the required packages like you and it started working again. |
Thank you @ben-hampson . After searching for a solution for over 2 hours this seemed to do the trick! |
It is working but if you spawn a new shell, that will be the same and you need to run the command again |
I got this error and though it was a bug, until I figured out I was within a Poetry shell/virtual env (which is automatically activated by Pycharm). Everything works fine outside Poetry shell. $ poetry run poetry --version
Traceback (most recent call last):
File "/home/syr/.poetry/bin/poetry", line 17, in <module>
from poetry.console import main
File "/home/syr/.poetry/lib/poetry/console/__init__.py", line 1, in <module>
from .application import Application
File "/home/syr/.poetry/lib/poetry/console/application.py", line 3, in <module>
from cleo import Application as BaseApplication
ModuleNotFoundError: No module named 'cleo'
$ poetry --version
Poetry version 1.1.12 Maybe Poetry should do like Pipenv: detect this situation, print a warning, and execute outside the virtualenv? |
@ben-hampson thank you. Solve after 1 year! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option).Issue
After updating poetry to 1.1.0 with
poetry self update
, it stopped working. I cannot run evenpoetry --version
now.I searched for an issue but couldn't find one. #2991 was for a different problem.
The text was updated successfully, but these errors were encountered: