Installation

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:

  • Python 3.6+ is required. If you got an older version, look at the Python 3 Installation & Setup Guide.
    • 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, or download from here).
  • FFmpeg (mostly for video thumbnailing).
    • On Ubuntu you get it through sudo apt install ffmpeg.
    • On macOS brew install ffmpeg will do the trick.
    • On Windows you'll have to put a little work in.

Install pipx

Once you have those installed and have made sure that they are on your PATH, you can get Lektor installed with pipx. Select the pipx install method of your preference:

On Ubuntu through apt.

apt update
sudo apt install python3-venv pipx
pipx ensurepath

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

For more information on pipx installation see the documentation for pipx

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:

pipx install lektor

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.

virtualenv venv
. venv/bin/activate
pip install Lektor

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 .

Comments