python-poetry / python-poetry/poetry

Ubuntu 22.04, Python 3.10, and broken virtual environment layouts

Open
#6,371 21 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/venv kind/bug status/external-issue
Dominant language
Python
Stars
34.3k
Forks
2.5k
Avg merge
2d 19h
Merged PRs (30d)
30

Description

  • 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 Jammy

  • Poetry version: 1.2.0

  • Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/colindean/27d36dcc7cf78f722f374ebd5bfd970f (also contains log output and a brief description of env setup steps)

Issue

root@80d0e404badc:/what# poetry self add poetry-plugin-bundle
Using version ^1.0.0 for poetry-plugin-bundle

Updating dependencies
Resolving dependencies... (3.8s)

[Errno 2] No such file or directory: 'python'

I believe the problem is in here:

https://github.com/python-poetry/poetry/blob/f1af3f8eec26112b7271c4d3c602957d08cff3a9/src/poetry/utils/env.py#L1231-L1248

Ubuntu doesn't provide a python command anymore, just python3:

root@80d0e404badc:/what# python --version
bash: python: command not found
root@80d0e404badc:/what# python3 --version
Python 3.10.4

Seeing as though all supported versions of Python on which Poetry runs should also provide a python3 executable, perhaps the fallback here should be python3?

https://github.com/python-poetry/poetry/blob/f1af3f8eec26112b7271c4d3c602957d08cff3a9/src/poetry/utils/env.py#L1178

Contributor guide

Open the contributing guide

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

Start with src/poetry/utils/env.py around lines 1178 and 1231-1248, then reproduce poetry self add poetry-plugin-bundle on Ubuntu 22.04 with Python 3.10. Compare the environment executable fallback with the available python3 command; done means the reported dependency update no longer fails because python is absent.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.