diff --git a/README.md b/README.md index 4b2718a3dd5..4a6d02846e3 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ It supports Python 2.7 and 3.4+. Poetry provides a custom installer that will install `poetry` isolated from the rest of your system by vendorizing its dependencies. This is the -recommended way of installing `poetry`. +recommended way of installing `poetry`. The installer installs a script to run Poetry, which will use the version of Python used to install Poetry. ```bash curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python diff --git a/get-poetry.py b/get-poetry.py index e369c866d32..df0b5b44e08 100644 --- a/get-poetry.py +++ b/get-poetry.py @@ -194,7 +194,7 @@ def expanduser(path): POETRY_LIB_BACKUP = os.path.join(POETRY_HOME, "lib-backup") -BIN = """#!/usr/bin/env python +BIN_TEMPLATE = """#!/usr/bin/env {python_executable_name} # -*- coding: utf-8 -*- import glob import sys @@ -580,8 +580,10 @@ def make_bin(self): ) with open(os.path.join(POETRY_BIN, "poetry"), "w", encoding="utf-8") as f: - f.write(u(BIN)) - + python_executable_name = os.path.basename(Installer.CURRENT_PYTHON) + f.write( + u(BIN_TEMPLATE.format(python_executable_name=python_executable_name)) + ) if not WINDOWS: # Making the file executable st = os.stat(os.path.join(POETRY_BIN, "poetry"))