ยง2023-10-31
- Install
- Linux, macOS, Windows (WSL)
curl -sSL https://install.python-poetry.org | python3 -
curl -sSL https://install.python-poetry.org | python3 -
$ python3 install.python-poetry.org.sh
Retrieving Poetry metadata
# Welcome to Poetry!
This will download and install the latest version of Poetry,
a dependency and package manager for Python.
It will add the `poetry` command to Poetry's bin directory, located at:
/home/alexlai/.local/bin
You can uninstall at any time by executing this script with the --uninstall option,
and these changes will be reverted.
Installing Poetry (1.6.1): Done
Poetry (1.6.1) is installed now. Great!
To get started you need Poetry's bin directory (/home/alexlai/.local/bin) in your `PATH`
environment variable.
Add `export PATH="/home/alexlai/.local/bin:$PATH"` to your shell configuration file. ---> ~/.bashrc
Alternatively, you can call Poetry explicitly with `/home/alexlai/.local/bin/poetry`.
You can test that everything is set up by executing:
`poetry --version`
$ ls -l ~/.local/bin/poetry
lrwxrwxrwx 1 alexlai alexlai 51 Oct 31 08:15 /home/alexlai/.local/bin/poetry -> /home/alexlai/.local/share/pypoetry/venv/bin/poetry
alexlai@orgpi516G /opt/xfs/build/scripts $ ls -l ~/.local/share/pypoetry/venv/bin/
total 284
-rw-r--r-- 1 alexlai alexlai 2007 Oct 31 08:15 activate
-rw-r--r-- 1 alexlai alexlai 933 Oct 31 08:15 activate.csh
-rw-r--r-- 1 alexlai alexlai 2213 Oct 31 08:15 activate.fish
-rw-r--r-- 1 alexlai alexlai 9033 Oct 31 08:15 Activate.ps1
-rwxr-xr-x 1 alexlai alexlai 251 Oct 31 08:15 doesitcache
-rwxr-xr-x 1 alexlai alexlai 1235 Oct 31 08:15 dul-receive-pack
-rwxr-xr-x 1 alexlai alexlai 1231 Oct 31 08:15 dul-upload-pack
-rwxr-xr-x 1 alexlai alexlai 245 Oct 31 08:15 dulwich
-rwxr-xr-x 1 alexlai alexlai 248 Oct 31 08:15 jsonschema
-rwxr-xr-x 1 alexlai alexlai 245 Oct 31 08:15 keyring
-rwxr-xr-x 1 alexlai alexlai 268 Oct 31 08:15 normalizer
-rwxr-xr-x 1 alexlai alexlai 256 Oct 31 08:15 pip
-rwxr-xr-x 1 alexlai alexlai 256 Oct 31 08:15 pip3
-rwxr-xr-x 1 alexlai alexlai 256 Oct 31 08:15 pip3.11
-rwxr-xr-x 1 alexlai alexlai 253 Oct 31 08:15 pkginfo
-rwxr-xr-x 1 alexlai alexlai 260 Oct 31 08:15 poetry
-rwxr-xr-x 1 alexlai alexlai 260 Oct 31 08:15 pyproject-build
-rwxr-xr-x 1 alexlai alexlai 67408 Oct 31 08:15 python
-rwxr-xr-x 1 alexlai alexlai 67408 Oct 31 08:15 python3
-rwxr-xr-x 1 alexlai alexlai 67408 Oct 31 08:15 python3.11
-rwxr-xr-x 1 alexlai alexlai 273 Oct 31 08:15 virtualenv
- ~/.bashrc
...
# poetry, PYTHON PACKAGING AND DEPENDENCY MANAGEMENT MADE EASY
export PATH="~/.local/bin:$PATH"
poetry self update