Commit fb168214 by Sébastien Eustace Committed by Arun Babu Neelicattu

Add documentation for the new bootstrapping method

parent 4ebcd828
...@@ -18,109 +18,84 @@ on Windows, Linux and OSX. ...@@ -18,109 +18,84 @@ on Windows, Linux and OSX.
## Installation ## Installation
Poetry provides a custom installer that will install `poetry` isolated Poetry provides a custom installer that will install `poetry` isolated
from the rest of your system by vendorizing its dependencies. This is the from the rest of your system.
recommended way of installing `poetry`.
### osx / linux / bashonwindows install instructions ### osx / linux / bashonwindows install instructions
```bash ```bash
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python -
``` ```
### windows powershell install instructions ### windows powershell install instructions
```powershell ```powershell
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python - (Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py -UseBasicParsing).Content | python -
``` ```
!!! note The installer installs the `poetry` tool to Poetry's `bin` directory. This location depends on you system:
You only need to install Poetry once. It will automatically pick up the current - `$HOME/.local/bin` for Unix
Python version and use it to [create virtualenvs](/docs/managing-environments) accordingly. - `%APPDATA%\Python\Scripts` on Windows
The installer installs the `poetry` tool to Poetry's `bin` directory. If this directory is not on you `PATH`, you will need to add it manually
On Unix it is located at `$HOME/.poetry/bin` and on Windows at `%USERPROFILE%\.poetry\bin`. if you want to invoke Poetry with simply `poetry`.
This directory will be automatically added to your `$PATH` environment variable, Alternatively, you can use the full path to `poetry` to use it.
by appending a statement to your `$HOME/.profile` configuration (or equivalent files).
If you do not feel comfortable with this, please pass the `--no-modify-path` flag to
the installer and manually add the Poetry's `bin` directory to your path.
Finally, open a new shell and type the following: Once Poetry is installed you can execute the following:
```bash ```bash
poetry --version poetry --version
``` ```
If you see something like `Poetry 0.12.0` then you are ready to use Poetry. 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 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 by running the installer again with the `--uninstall` option or by setting
the `POETRY_UNINSTALL` environment variable before executing the installer. the `POETRY_UNINSTALL` environment variable before executing the installer.
```bash ```bash
python get-poetry.py --uninstall python install-poetry.py --uninstall
POETRY_UNINSTALL=1 python get-poetry.py 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: 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:
```bash ```bash
POETRY_HOME=/etc/poetry python get-poetry.py POETRY_HOME=/etc/poetry python install-poetry.py
``` ```
If you want to install prerelease versions, you can do so by passing `--preview` to `get-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: or by using the `POETRY_PREVIEW` environment variable:
```bash ```bash
python get-poetry.py --preview python install-poetry.py --preview
POETRY_PREVIEW=1 python get-poetry.py POETRY_PREVIEW=1 python install-poetry.py
``` ```
Similarly, if you want to install a specific version, you can use `--version` or the `POETRY_VERSION` Similarly, if you want to install a specific version, you can use `--version` option or the `POETRY_VERSION`
environment variable: environment variable:
```bash ```bash
python get-poetry.py --version 0.12.0 python install-poetry.py --version 1.2.0
POETRY_VERSION=0.12.0 python get-poetry.py POETRY_VERSION=1.2.0 python install-poetry.py
``` ```
!!!note You can also install Poetry for a `git` repository by using the `--git` option:
Note that the installer does not support Poetry releases < 0.12.0.
!!!note
The setup script must be able to find one of following executables in your shell's path environment:
- `python` (which can be a py3 or py2 interpreter)
- `python3`
- `py.exe -3` (Windows)
- `py.exe -2` (Windows)
### Alternative installation methods (not recommended) ```bash
python install-poetry.py --git https://github.com/python-poetry/poetry.git@master
````
!!!note !!!note
Using alternative installation methods will make Poetry always Note that the installer does not support Python < 3.6.
use the Python version for which it has been installed to create
virtualenvs.
So, you will need to install Poetry for each Python version you
want to use and switch between them.
#### Installing with `pip`
Using `pip` to install Poetry is possible.
```bash
pip install --user poetry
```
!!!warning
Be aware that it will also install Poetry's dependencies ### Alternative installation methods
which might cause conflicts with other packages.
#### Installing with `pipx` #### Installing with `pipx`
Using [`pipx`](https://github.com/cs01/pipx) to install Poetry is also possible. `pipx` is used to install Python CLI applications globally while still isolating them in virtual environments. This allows for clean upgrades and uninstalls. `pipx` supports Python 3.6 and later. If using an earlier version of Python, consider [`pipsi`](https://github.com/mitsuhiko/pipsi). Using [`pipx`](https://github.com/pipxproject/pipx) to install Poetry is also possible.
`pipx` is used to install Python CLI applications globally while still isolating them in virtual environments.
This allows for clean upgrades and uninstalls.
```bash ```bash
pipx install poetry pipx install poetry
...@@ -134,7 +109,19 @@ pipx upgrade poetry ...@@ -134,7 +109,19 @@ pipx upgrade poetry
pipx uninstall poetry pipx uninstall poetry
``` ```
[Github repository](https://github.com/cs01/pipx).
#### Installing with `pip`
Using `pip` to install Poetry is possible.
```bash
pip install --user poetry
```
!!!warning
Be aware that it will also install Poetry's dependencies
which might cause conflicts with other packages.
## Updating `poetry` ## Updating `poetry`
...@@ -155,18 +142,9 @@ And finally, if you want to install a specific version, you can pass it as an ar ...@@ -155,18 +142,9 @@ And finally, if you want to install a specific version, you can pass it as an ar
to `self update`. to `self update`.
```bash ```bash
poetry self update 0.8.0 poetry self update 1.2.0
``` ```
!!!note
The `self update` command will only work if you used the recommended
installer to install Poetry.
!!!note
If you are still on poetry version < 1.0 use `poetry self:update` instead.
## Enable tab completion for Bash, Fish, or Zsh ## Enable tab completion for Bash, Fish, or Zsh
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment