python-poetry / python-poetry/install.python-poetry.org

Poetry Installation(Official Installer Script) error with Python 3.12.9 on Ubuntu 24.04

Open
#156 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
255
Forks
65
Avg merge
2h 48m
Merged PRs (30d)
1

Description

I encountered an error while trying to install Poetry using Python 3.12. The installation fails with following error message:

Install Python 3.12
Run the Poetry installation: curl -sSL https://install.python-poetry.org | POETRY_HOME=/etc/poetry python3 -

The installation fails with following error message:
` Installing Poetry...
Retrieving Poetry metadata

Welcome to Poetry!

This will download and install the latest version of Poetry,
a dependency and package manager for Python.

It will add the poetry command to Poetry's bin directory, located at:

/etc/poetry/bin

You can uninstall at any time by executing this script with the --uninstall option,
and these changes will be reverted.

Installing Poetry (2.0.1)
Installing Poetry (2.0.1): Creating environment
Installing Poetry (2.0.1): An error occurred. Removing partial environment.
Poetry installation failed.
See /install/poetry-installer-error-m9digvmf.log for error logs.
Poetry installation failed. See error log for details.
Poetry installation failed. Printing error log:
/etc/poetry/venv/bin/python3: No module named ensurepip

Traceback:

File "", line 937, in main
File "", line 576, in run`

Operating System: Ubuntu 24.04
Python Version: 3.12.9
Poetry Version: 2.0.1

I suspect that there might be an issue with the Poetry installation script or its dependencies when running on Python 3.12.9.

Please let me know if you need any additional information or fixes available for this issue.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported command on Ubuntu 24.04 with Python 3.12.9, then inspect the official installer script's environment-creation path and the referenced /install/poetry-installer-error-m9digvmf.log output. Done means the installer completes successfully in this environment without the /etc/poetry/venv/bin/python3: No module named ensurepip failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.