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 Installation(Official Installer Script) error with Python 3.12.9 on Ubuntu 24.04 #156

Open
antika080 opened this issue Feb 7, 2025 · 2 comments

Comments

@antika080
Copy link

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.

@Secrus
Copy link
Member

Secrus commented Feb 7, 2025

Do you have a python3.12-venv package installed? ubuntu breaks python installations by separating venv package from the main python installation.

@antika080
Copy link
Author

antika080 commented Feb 7, 2025

@Secrus after running this: python3.12 -m venv --help

i can see following output:

`usage: venv [-h] [--system-site-packages] [--symlinks | --copies] [--clear]
[--upgrade] [--without-pip] [--prompt PROMPT] [--upgrade-deps]
ENV_DIR [ENV_DIR ...]

Creates virtual Python environments in one or more target directories.

positional arguments:
ENV_DIR A directory to create the environment in.

options:
-h, --help show this help message and exit
--system-site-packages
Give the virtual environment access to the system
site-packages dir.
--symlinks Try to use symlinks rather than copies, when symlinks
are not the default for the platform.
--copies Try to use copies rather than symlinks, even when
symlinks are the default for the platform.
--clear Delete the contents of the environment directory if it
already exists, before environment creation.
--upgrade Upgrade the environment directory to use this version
of Python, assuming Python has been upgraded in-place.
--without-pip Skips installing or upgrading pip in the virtual
environment (pip is bootstrapped by default)
--prompt PROMPT Provides an alternative prompt prefix for this
environment.
--upgrade-deps Upgrade core dependencies (pip) to the latest version
in PyPI
`
it could be part of python installation, do we need to check something else also?

I could not find this package python3.12-venv using dpkg command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants