question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ModuleNotFoundError: No module named 'cleo'

See original GitHub issue
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS: Mac OS X / 10.14.6 / 18G5033
  • Poetry version: 1.1.0
  • Python version: 3.8

Issue

After updating poetry to 1.1.0 with poetry self update, it stopped working. I cannot run even poetry --version now.

$ poetry self update
Updating to 1.1.0
 - Downloading poetry-1.1.0-darwin.tar.gz 100%

Poetry (1.1.0) is installed now. Great!

$ poetry
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'

$ poetry --version
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 searched for an issue but couldn’t find one. #2991 was for a different problem.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:19 (2 by maintainers)

github_iconTop GitHub Comments

19reactions
Ben-Hampsoncommented, Dec 28, 2021

@anpr I struggled to get this working on Python 3.10 too. The following worked:

pip install cleo tomlkit poetry.core requests cachecontrol cachy html5lib pkginfo virtualenv lockfile

9reactions
anprcommented, Dec 9, 2021

I use python with pyenv, and experienced the same issue if I tried to run poetry with Python 3.10.

I fixed it with

$ pyenv install 3.9.9   # if you haven't done so already
$ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py > get-poetry.py
$ pyenv local 3.9.9
$ python get-poetry.py --uninstall
$ python get-poetry.py

Then I manually edited ~/.poetry/bin/poetry to use python 3.9.9 all the time:

#!/Users/anpr/.pyenv/versions/3.9.9/bin/python

Seems like a hack, and there is maybe a bug in poetry if it’s run with Python 3.10?

Read more comments on GitHub >

github_iconTop Results From Across the Web

No module named 'cleo' after poetry self:update #553 - GitHub
I have updated poetry using the command: $ poetry self:update Updating to 0.12.4 - Getting dependencies - Vendorizing dependencies - Updating ...
Read more >
I am getting no module name cleo when trying to do "poetry add"
django - I am getting no module name cleo when trying to do "poetry add" - Stack Overflow. Stack Overflow for Teams –...
Read more >
Python+Poetry: ModuleNotFoundError: No module named 'cleo'
Ooops: poetry failed with ModuleNotFoundError: No module named 'cleo' I googled about the error. I found a github issue about it.
Read more >
ModuleNotFoundError: No module named 'cleo' - RoseIndia.Net
Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'cleo' How to remove the ModuleNotFoun.
Read more >
Poetry not correctly installed on Python 3.9 - Render community
Seems like on 3.9 Poetry is not correctly installed? This is my build command. NODE_ENV=production poetry install --no-dev && pip install ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found