No module named `poetry.core` on Py3.9.0b1

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 version and name: Ubuntu 20.04
  • Poetry version: 1.1.0a1
  • Link of a Gist with the contents of your pyproject.toml file: N/A

Issue

I’ve installed Py3.9.0b1 through pyenv (listed as 3.9-dev) and am attempting to use poetry. Using Poetry 1.0.5, I receive:

Traceback (most recent call last):
  File "/home/joe/.poetry/bin/poetry", line 12, in <module>
    from poetry.console import main
  File "/home/joe/.poetry/lib/poetry/console/__init__.py", line 1, in <module>
    from .application import Application
  File "/home/joe/.poetry/lib/poetry/console/application.py", line 1, in <module>
    from cleo import Application as BaseApplication
ModuleNotFoundError: No module named 'cleo'

…so I reinstalled from get-poetry.py asking for the preview version. This gives:

Traceback (most recent call last):
  File "/home/joe/.poetry/bin/poetry", line 16, in <module>
    from poetry.console import main
  File "/home/joe/.poetry/lib/poetry/console/__init__.py", line 1, in <module>
    from .application import Application
  File "/home/joe/.poetry/lib/poetry/console/application.py", line 5, in <module>
    from .commands.about import AboutCommand
  File "/home/joe/.poetry/lib/poetry/console/commands/__init__.py", line 4, in <module>
    from .check import CheckCommand
  File "/home/joe/.poetry/lib/poetry/console/commands/check.py", line 1, in <module>
    from poetry.factory import Factory
  File "/home/joe/.poetry/lib/poetry/factory.py", line 9, in <module>
    from poetry.core.factory import Factory as BaseFactory
ModuleNotFoundError: No module named 'poetry.core'

…on every call to Poetry.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

11reactions
WesleyBatistacommented, Dec 5, 2020

I experienced the same issue when upgrading from 1.0.5 using the poetry self update command.

$ poetry self update
Updating to 1.1.4
 - Downloading poetry-1.1.4-linux.tar.gz 100%

Poetry (1.1.4) is installed now. Great!

$ poetry --help     
Traceback (most recent call last):
  File "/home/wesley/.poetry/bin/poetry", line 12, in <module>
    from poetry.console import main
  File "/home/wesley/.poetry/lib/poetry/console/__init__.py", line 1, in <module>
    from .application import Application
  File "/home/wesley/.poetry/lib/poetry/console/application.py", line 7, in <module>
    from .commands.about import AboutCommand
  File "/home/wesley/.poetry/lib/poetry/console/commands/__init__.py", line 2, in <module>
    from .add import AddCommand
  File "/home/wesley/.poetry/lib/poetry/console/commands/add.py", line 8, in <module>
    from .init import InitCommand
  File "/home/wesley/.poetry/lib/poetry/console/commands/init.py", line 16, in <module>
    from poetry.core.pyproject import PyProjectException
ModuleNotFoundError: No module named 'poetry.core'

what solved it for me was:

$ pip install -U poetry
4reactions
clintonroycommented, Dec 22, 2021

Please try using pipx to install poetry. Honestly, I just don’t understand why everyone tries to use weird scripts rather than bog standard tools.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No module named` after poetry install for package - Stack ...
The issue is that the package is not installed after running poetry install . % poetry install Installing dependencies from lock file Package ......
Read more >
ModuleNotFoundError: No module named 'poetry-core'
Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'poetry-core' How to remove the Module.
Read more >
poetry-core - PyPI
A PEP 517 build backend implementation developed for Poetry. This project is intended to be a light weight, fully compliant, self-contained package allowing...
Read more >
py3-poetry-core - Alpine Linux packages
Package, py3-poetry-core. Version, 1.3.2-r1. Description, PEP 517 build backend implementation for Poetry.
Read more >
python-poetry-core-git - AUR (en) - Arch Linux
tests/conftest.py:9: in <module> import virtualenv E ModuleNotFoundError: No module named 'virtualenv' ==> ERROR: A failure occurred in check(). Aborting...
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