lektor-website/content/docs/installation/contents.lr

102 lines
3.0 KiB
Plaintext
Raw Normal View History

2015-12-19 14:52:17 +01:00
title: Installation
---
summary: How to install Lektor on your computer.
---
sort_key: 50
---
body:
Lektor is a command line utility, and requires some terminal or command line work
to install. If you can read and follow instructions, you will most likely have no
issues.
## Requirements
Although `lektor` would work without Imagemagick or FFmpeg, you would be missing on
significant parts of its capabilities. Therefore, you need to make sure you have the
following software installed on your computer:
2022-02-27 23:10:05 +01:00
* Python 3.6+ is required. If you got an older version, look at the
[Python 3 Installation & Setup Guide :ext](https://realpython.com/installing-python/).
* On Ubuntu you basically don't need anything new.
* On macOS you're done as well.
* On Windows, make sure that Python is in your `PATH`.
* ImageMagick.
* On macOS `brew install imagemagick` can get you this.
* On Ubuntu `sudo apt install imagemagick` will solve it.
* On Windows do `choco install imagemagick`, which requires [chocolatey :ext](https://chocolatey.org/),
or [download from here :ext](http://www.imagemagick.org)).
* FFmpeg (mostly for video thumbnailing).
* On Ubuntu you get it through `sudo apt install ffmpeg.`
* On macOS `brew install ffmpeg` will do the trick.
2022-02-27 23:10:05 +01:00
* On Windows you'll have to put a little [work :ext](https://www.wikihow.com/Install-FFmpeg-on-Windows) in.
## Install pipx
2015-12-19 14:52:17 +01:00
Once you have those installed and have made sure that they are on your `PATH`, you can
get Lektor installed with `pipx`. Selcet the `pipx` install method of your preference:
2015-12-19 14:52:17 +01:00
__On Ubuntu through `apt`.__
2015-12-19 14:52:17 +01:00
```
apt update
sudo apt install python3-venv pipx
pipx ensurepath
2015-12-19 14:52:17 +01:00
```
__On Ubuntu through `pip`.__
```
sudo apt install python3-pip python3-venv
python3 -m pip install --user pipx
python3 -m pipx ensurepath
```
__On macOS__
```
brew install pipx
pipx ensurepath
```
__On Windows__
```
python -m pip install --user pipx
python -m pipx ensurepath
```
2022-02-27 23:10:05 +01:00
For more information on `pipx` installation see the [documentation for pipx :ext](https://pypa.github.io/pipx/installation/)
2020-04-21 21:58:04 +02:00
### Finally Install Lektor
Once installed, close terminal (or `Powershell` or `command prompt`) for those
changes to take effect. Then proceed to reopen and install Lektor with pipx:
2020-04-21 21:58:04 +02:00
```
pipx install lektor
```
2015-12-19 14:52:17 +01:00
2020-04-21 21:58:04 +02:00
2015-12-23 20:18:39 +01:00
## pip
Alternatively you can manually install the command line version with
`pip` after creating a virtual environment, if you know how that works. `pipx` technically does this for you,
then if you need something particular and you know this will make it easier,
go for it.
2015-12-19 14:52:17 +01:00
```
virtualenv venv
. venv/bin/activate
pip install Lektor
2015-12-19 14:52:17 +01:00
```
## Development Version
If you want to install the development version of Lektor you can do so. It's
the same as with installing the command line application but instead of
using PyPI you install directly from git and you need to have `npm` installed
to build the admin UI:
```
git clone https://github.com/lektor/lektor
cd lektor
make build-js
virtualenv venv
. venv/bin/activate
pip install --editable .
2015-12-19 14:52:17 +01:00
```