2015-12-19 14:52:17 +01:00
|
|
|
title: Installation
|
|
|
|
---
|
|
|
|
summary: How to install Lektor on your computer.
|
|
|
|
---
|
|
|
|
sort_key: 50
|
|
|
|
---
|
|
|
|
body:
|
|
|
|
|
2015-12-22 15:56:22 +01:00
|
|
|
Lektor comes in two flavors: as a command line executable and as a
|
|
|
|
desktop application. The desktop version also contains the command
|
|
|
|
line executable, but it also bundles together all dependencies of Lektor
|
|
|
|
in an easy to use package which heavily simplifies installation.
|
2015-12-19 14:52:17 +01:00
|
|
|
|
|
|
|
## Desktop Application
|
|
|
|
|
|
|
|
Currently the desktop application is only available for OS X and can be
|
|
|
|
[downloaded from the Lektor website](../../downloads/). It comes as a downloadable
|
|
|
|
disk image that you can mount which contains one application by the name of
|
|
|
|
`Lektor.app`. Just drag it into your `Applications` folder and you are good to
|
|
|
|
go.
|
|
|
|
|
|
|
|
If you also want access to the command line tools just launch `Lektor.app`
|
2015-12-23 23:40:46 +01:00
|
|
|
and then click in the menu bar on *Lektor ➤ Install Shell Command*.
|
2015-12-19 14:52:17 +01:00
|
|
|
|
|
|
|
## Command Line Application
|
|
|
|
|
2015-12-22 15:56:22 +01:00
|
|
|
If you do not want to install the desktop app then you can just install the command
|
2016-01-13 16:46:41 +01:00
|
|
|
line executable. This runs on most operating systems (OSX, Linux and Windows) but
|
2015-12-22 15:56:22 +01:00
|
|
|
the installation is a bit more involved.
|
2015-12-19 14:52:17 +01:00
|
|
|
|
|
|
|
You need to make sure you have the following software installed on your computer:
|
|
|
|
|
2016-06-03 06:54:49 +02:00
|
|
|
* Python 2.7 or above (also `python-dev`, `libssl-dev` and
|
2015-12-28 11:51:30 +01:00
|
|
|
`libffi-dev` is required on Ubuntu)
|
2016-07-02 01:29:23 +02:00
|
|
|
`sudo apt-get install python-dev libssl-dev libffi-dev`
|
|
|
|
* ImageMagick (`brew install imagemagick` can get you this on OS X and `sudo apt-get install imagemagick`
|
|
|
|
on Ubuntu the `imagemagick` package needs to be installed.
|
|
|
|
On Windows do `chocoinstall imagemagick`, which requires [chocolatey :ext](https://chocolatey.org/),
|
2015-12-21 13:22:49 +01:00
|
|
|
or [download from here :ext](http://www.imagemagick.org)).
|
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
|
2015-12-21 13:22:49 +01:00
|
|
|
get Lektor installed with our installation script:
|
2015-12-19 14:52:17 +01:00
|
|
|
|
|
|
|
```
|
|
|
|
$ curl -sf https://www.getlektor.com/install.sh | sh
|
|
|
|
```
|
2015-12-21 13:22:49 +01:00
|
|
|
|
2015-12-20 17:21:02 +01:00
|
|
|
For Windows you can use the `command prompt`:
|
2015-12-21 13:22:49 +01:00
|
|
|
|
2015-12-20 17:21:02 +01:00
|
|
|
```
|
|
|
|
C:\> @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://getlektor.com/install.ps1'))" && SET PATH=%PATH%;%LocalAppData%\lektor-cli
|
|
|
|
```
|
|
|
|
but you can also do it directly in `Powershell`:
|
|
|
|
```
|
|
|
|
PS C:\> iex ((new-object net.webclient).DownloadString('https://getlektor.com/install.ps1'))
|
|
|
|
```
|
2015-12-19 14:52:17 +01:00
|
|
|
|
2015-12-23 20:18:39 +01:00
|
|
|
## pip
|
|
|
|
|
|
|
|
Alternatively you can manually install the command line version with
|
|
|
|
`virtualenv` if you know how that works. Note that this method is *heavily
|
|
|
|
discouraged* for anything other than advanced use cases such as build servers.
|
2015-12-19 14:52:17 +01:00
|
|
|
|
|
|
|
```
|
|
|
|
$ virtualenv venv
|
|
|
|
$ . venv/bin/activate
|
|
|
|
$ pip install Lektor
|
|
|
|
```
|
|
|
|
|
2015-12-25 22:55:08 +01:00
|
|
|
!!!! When we say this installation type is discouraged we mean it. The reason
|
|
|
|
is that it encourages uses of Lektor which are entirely unsupported by us.
|
|
|
|
Lektor actively manages virtualenvs for plugin installations in very specific
|
|
|
|
ways and this might or might not work in your setup. We support pip
|
|
|
|
installations for deployment environments and local development only.
|
|
|
|
|
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 .
|
|
|
|
```
|