1
0
Fork 0
mirror of https://github.com/python-poetry/install.python-poetry.org.git synced 2024-11-21 05:30:58 -05:00
(A fork of) The official Poetry installation script
Find a file
pre-commit-ci[bot] c09d0c66e7
[pre-commit.ci] pre-commit autoupdate (#15)
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.2.0 → v4.3.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.2.0...v4.3.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-06-13 19:13:33 -04:00
.github/workflows Test against python 3.11 and remove obsolete code-quality workflow (#14) 2022-06-06 11:51:12 -06:00
.flake8 Misc. cleanup for project setup (#1) 2021-11-12 18:28:30 -07:00
.gitignore Misc. cleanup for project setup (#1) 2021-11-12 18:28:30 -07:00
.pre-commit-config.yaml [pre-commit.ci] pre-commit autoupdate (#15) 2022-06-13 19:13:33 -04:00
install-poetry.py ensure exit code 1 on invalid version 2022-02-08 21:13:20 +01:00
pyproject.toml Test against python 3.11 and remove obsolete code-quality workflow (#14) 2022-06-06 11:51:12 -06:00
README.md Update README.md 2022-01-21 10:00:14 -07:00
vercel.json Set content-type header to text/plain 2022-02-09 10:29:08 +01:00

Python Poetry Installer

This repository contains Poetry's official installation script, installer source and related hosting configuration.

The script is hosted on Vercel and made available at https://install.python-poetry.org/.

Usage

Poetry provides a custom installer that will install poetry isolated from the rest of your system.

osx / linux / bashonwindows / Windows+MinGW install instructions

curl -sSL https://install.python-poetry.org | python -

windows powershell install instructions

(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -

Warning: The previous get-poetry.py installer is now deprecated, if you are currently using it you should migrate to the new, supported, install-poetry.py installer.

The installer installs the poetry tool to Poetry's bin directory. This location depends on your system:

  • $HOME/.local/bin for Unix
  • %APPDATA%\Python\Scripts on Windows

If this directory is not on your PATH, you will need to add it manually if you want to invoke Poetry with simply poetry.

Alternatively, you can use the full path to poetry to use it.

Once Poetry is installed you can execute the following:

poetry --version

If you see something like Poetry (version 1.2.0) then you are ready to use Poetry. If you decide Poetry isn't your thing, you can completely remove it from your system by running the installer again with the --uninstall option or by setting the POETRY_UNINSTALL environment variable before executing the installer.

python install-poetry.py --uninstall
POETRY_UNINSTALL=1 python install-poetry.py

By default, Poetry is installed into the user's platform-specific home directory. If you wish to change this, you may define the POETRY_HOME environment variable:

POETRY_HOME=/etc/poetry python install-poetry.py

If you want to install prerelease versions, you can do so by passing --preview option to install-poetry.py or by using the POETRY_PREVIEW environment variable:

python install-poetry.py --preview
POETRY_PREVIEW=1 python install-poetry.py

Similarly, if you want to install a specific version, you can use --version option or the POETRY_VERSION environment variable:

python install-poetry.py --version 1.2.0
POETRY_VERSION=1.2.0 python install-poetry.py

You can also install Poetry for a git repository by using the --git option:

python install-poetry.py --git https://github.com/python-poetry/poetry.git@master

Note: Note that the installer does not support Python < 3.6.