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:
|
def _find_python_executable(self) -> None: |
|
bin_dir = self._bin_dir |
|
|
|
if self._is_windows and self._is_conda: |
|
bin_dir = self._path |
|
|
|
python_executables = sorted( |
|
p.name |
|
for p in bin_dir.glob("python*") |
|
if re.match(r"python(?:\d+(?:\.\d+)?)?(?:\.exe)?$", p.name) |
|
) |
|
if python_executables: |
|
executable = python_executables[0] |
|
if executable.endswith(".exe"): |
|
executable = executable[:-4] |
|
|
|
self._executable = executable |
|
|
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?
|
self._executable = "python" |
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 (
-vvvoption).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
I believe the problem is in here:
poetry/src/poetry/utils/env.py
Lines 1231 to 1248 in f1af3f8
Ubuntu doesn't provide a
pythoncommand anymore, justpython3:Seeing as though all supported versions of Python on which Poetry runs should also provide a
python3executable, perhaps the fallback here should bepython3?poetry/src/poetry/utils/env.py
Line 1178 in f1af3f8