Python: Mention installation via pip and sort prerequisites

cc #4138
This commit is contained in:
Simon Hausmann 2024-04-18 13:44:20 +02:00
parent 382967603f
commit 97940ee7b8

View file

@ -18,13 +18,23 @@ in detail.
## Prerequisites
* Install Rust by following the [Rust Getting Started Guide](https://www.rust-lang.org/learn/get-started). If you already
have Rust installed, make sure that it's at least version 1.73 or newer. You can check which version you have installed
by running `rustc --version`. Once this is done, you should have the `rustc` compiler and the `cargo` build system installed in your path. This requirement will be removed before the final release of Slint for Python.
* [Python 3](https://python.org/)
* [pip](https://pypi.org/project/pip/)
* [Pipenv](https://pipenv.pypa.io/en/latest/installation.html#installing-pipenv)
## Installation
Slint can be installed with `pip` from the [Python Package Index](https://pypi.org):
```
pip install slint
```
The installation will use binaries provided vi macOS, Windows, and Linux for various architectures. If your target platform is not covered by binaries,
`pip` will automatically build Slint from source. If that happens, you need common software development tools on your machine, as well as [Rust](https://www.rust-lang.org/learn/get-started).
### Building from Source
## Try it out
If you want to just play with this, you can try running our Python port of the [printer demo](../../examples/printerdemo/python/README.md):