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

Install error from bad python3-distutils on Ubuntu 20.04 and Python 3.9

Offen
#37 7 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Python
Sterne
255
Forks
65
Ø Merge
2 Std. 48 Min.
Gemergte PRs (30 T.)
1

Beschreibung

  • 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.5 (focal)

  • Poetry version: 1.2.0

  • Link of a Gist with the contents of your pyproject.toml file: D/C

Issue

Running:

$ curl -sSL https://install.python-poetry.org | python3 -
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:

/home/user/.local/bin

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

Installing Poetry (1.2.0): An error occurred. Removing partial environment.
Poetry installation failed.
See /home/user/poetry-installer-error-017x_k1p.log for error logs.

Traceback on log:

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/user/.local/share/pypoetry/venv/lib/python3.8/site-packages/pip/__main__.py", line 29, in <module>
    from pip._internal.cli.main import main as _main
  File "/home/user/.local/share/pypoetry/venv/lib/python3.8/site-packages/pip/_internal/cli/main.py", line 9, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "/home/user/.local/share/pypoetry/venv/lib/python3.8/site-packages/pip/_internal/cli/autocompletion.py", line 10, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/home/user/.local/share/pypoetry/venv/lib/python3.8/site-packages/pip/_internal/cli/main_parser.py", line 8, in <module>
    from pip._internal.cli import cmdoptions
  File "/home/user/.local/share/pypoetry/venv/lib/python3.8/site-packages/pip/_internal/cli/cmdoptions.py", line 24, in <module>
    from pip._internal.cli.parser import ConfigOptionParser
  File "/home/user/.local/share/pypoetry/venv/lib/python3.8/site-packages/pip/_internal/cli/parser.py", line 12, in <module>
    from pip._internal.configuration import Configuration, ConfigurationError
  File "/home/user/.local/share/pypoetry/venv/lib/python3.8/site-packages/pip/_internal/configuration.py", line 26, in <module>
    from pip._internal.utils.logging import getLogger
  File "/home/user/.local/share/pypoetry/venv/lib/python3.8/site-packages/pip/_internal/utils/logging.py", line 29, in <module>
    from pip._internal.utils.misc import ensure_dir
  File "/home/user/.local/share/pypoetry/venv/lib/python3.8/site-packages/pip/_internal/utils/misc.py", line 42, in <module>
    from pip._internal.locations import get_major_minor_version
  File "/home/user/.local/share/pypoetry/venv/lib/python3.8/site-packages/pip/_internal/locations/__init__.py", line 67, in <module>
    from . import _distutils
  File "/home/user/.local/share/pypoetry/venv/lib/python3.8/site-packages/pip/_internal/locations/_distutils.py", line 20, in <module>
    from distutils.cmd import Command as DistutilsCommand
ModuleNotFoundError: No module named 'distutils.cmd'

Traceback:

  File "<stdin>", line 892, in main
  File "<stdin>", line 528, in run
  File "<stdin>", line 549, in install
  File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "<stdin>", line 621, in make_env
  File "<stdin>", line 607, in make_env
  File "<stdin>", line 339, in make
  File "<stdin>", line 362, in pip
  File "<stdin>", line 359, in python
  File "<stdin>", line 352, in run

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, den Befehl curl -sSL https://install.python-poetry.org | python3 - unter Ubuntu 20.04 zu reproduzieren. Untersuche anschließend den Installationspfad, der die Umgebung erstellt und pip aufruft, und verwende den bereitgestellten Traceback als Fehlerstelle. Als erledigt gilt die Aufgabe, wenn das Installationsprogramm erfolgreich abgeschlossen wird, ohne dass der Fehler ModuleNotFoundError: No module named 'distutils.cmd' auftritt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python, ubuntu
Bereich
devops, tooling
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.