2015-12-19 14:52:17 +01:00
|
|
|
title: Installation
|
|
|
|
---
|
|
|
|
summary: How to install Lektor on your computer.
|
|
|
|
---
|
|
|
|
sort_key: 50
|
|
|
|
---
|
|
|
|
body:
|
|
|
|
|
2022-02-23 23:46:50 +01:00
|
|
|
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/).
|
2022-02-23 23:46:50 +01:00
|
|
|
* 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.
|
2022-02-23 23:46:50 +01:00
|
|
|
|
|
|
|
## Install pipx
|
2015-12-19 14:52:17 +01:00
|
|
|
|
2015-12-22 15:56:22 +01:00
|
|
|
Once you have those installed and have made sure that they are on your `PATH`, you can
|
2022-02-23 23:46:50 +01:00
|
|
|
get Lektor installed with `pipx`. Selcet the `pipx` install method of your preference:
|
2015-12-19 14:52:17 +01:00
|
|
|
|
2022-02-23 23:46:50 +01:00
|
|
|
__On Ubuntu through `apt`.__
|
2015-12-19 14:52:17 +01:00
|
|
|
```
|
2022-02-23 23:46:50 +01:00
|
|
|
apt update
|
|
|
|
sudo apt install python3-venv pipx
|
|
|
|
pipx ensurepath
|
2015-12-19 14:52:17 +01:00
|
|
|
```
|
2022-02-23 23:46:50 +01:00
|
|
|
__On Ubuntu through `pip`.__
|
2018-09-08 13:17:08 +02:00
|
|
|
```
|
2022-02-23 23:46:50 +01:00
|
|
|
sudo apt install python3-pip python3-venv
|
|
|
|
python3 -m pip install --user pipx
|
|
|
|
python3 -m pipx ensurepath
|
2018-09-08 13:17:08 +02:00
|
|
|
```
|
2022-02-23 23:46:50 +01:00
|
|
|
__On macOS__
|
|
|
|
```
|
|
|
|
brew install pipx
|
|
|
|
pipx ensurepath
|
2015-12-20 17:21:02 +01:00
|
|
|
```
|
2022-02-23 23:46:50 +01:00
|
|
|
__On Windows__
|
2015-12-20 17:21:02 +01:00
|
|
|
```
|
2022-02-23 23:46:50 +01:00
|
|
|
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
|
|
|
|
2022-02-23 23:46:50 +01: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
|
|
|
|
2015-12-20 17:21:02 +01:00
|
|
|
```
|
2022-02-23 23:46:50 +01:00
|
|
|
pipx install lektor
|
2015-12-20 17:21:02 +01:00
|
|
|
```
|
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
|
2022-02-23 23:46:50 +01:00
|
|
|
`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
|
|
|
|
|
|
|
```
|
2022-02-23 23:46:50 +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:
|
|
|
|
|
|
|
|
```
|
2022-02-23 23:46:50 +01:00
|
|
|
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
|
|
|
```
|