Skip to content

Can't install Poetry on Ubuntu 22.04.1 LTS on WSL #82

@PascalStehling

Description

@PascalStehling
  • Poetry version: The newest one via curl -sSL https://install.python-poetry.org | python3 -
  • Python version: Python 3.10.6
  • OS version and name: Ubuntu 22.04.1 LTS
  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

When running the standard installation Script (curl -sSL https://install.python-poetry.org | python3 -) on an fresh install of Ubuntu 22.04.1 LTS on WSL via the Microsoft Store, the following error occurs:

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.2): An error occurred. Removing partial environment.
Traceback (most recent call last):
  File "<stdin>", line 940, in <module>
  File "<stdin>", line 919, in main
  File "<stdin>", line 550, in run
  File "<stdin>", line 571, in install
  File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "<stdin>", line 643, in make_env
  File "<stdin>", line 629, in make_env
  File "<stdin>", line 344, in make
  File "<stdin>", line 367, in pip
  File "<stdin>", line 364, in python
  File "<stdin>", line 350, in run
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/home/USER/.local/share/pypoetry/venv/bin/python'

I tried it on two different Machines multiple times and the same error occured. On Ubuntu 20.04.5 LTS its working without any problem. So far I could not find a way to fix this Problem.

Thanks for your help in advance and have a nice day :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionNot an issue, but a question instead

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions