Installation¶
lineage is available on the
Python Package Index. Install lineage (and its required
Python dependencies) via pip:
$ pip install lineage
Installation and Usage on a Raspberry Pi¶
The instructions below provide the steps to install lineage on a
Raspberry Pi (tested with
“Raspberry Pi OS (32-bit) Lite”,
release date 2020-08-20). For more details about Python on the Raspberry Pi, see
here.
Note
Text after a prompt (e.g., $) is the command to type at the command line. The
instructions assume a fresh install of Raspberry Pi OS and that after logging in as
the pi user, the current working directory is /home/pi.
Install
pipfor Python 3:pi@raspberrypi:~ $ sudo apt install python3-pip
Press “y” followed by “enter” to continue. This enables us to install packages from the Python Package Index.
Install the
venvmodule:pi@raspberrypi:~ $ sudo apt install python3-venv
Press “y” followed by “enter” to continue. This enables us to create a virtual environment to isolate the
lineageinstallation from other system Python packages.-
pi@raspberrypi:~ $ sudo apt install libatlas-base-dev
Press “y” followed by “enter” to continue. This is required for NumPy, a dependency of
lineage. -
pi@raspberrypi:~ $ sudo apt install libjbig0 liblcms2-2 libopenjp2-7 libtiff5 libwebp6 libwebpdemux2 libwebpmux3
Press “y” followed by “enter” to continue. This is required for Matplotlib, a dependency of
lineage. Create a directory for
lineageand change working directory:pi@raspberrypi:~ $ mkdir lineage pi@raspberrypi:~ $ cd lineage
Create a virtual environment for
lineage:pi@raspberrypi:~/lineage $ python3 -m venv .venv
The virtual environment is located at
/home/pi/lineage/.venv.Activate the virtual environment:
pi@raspberrypi:~/lineage $ source .venv/bin/activate
Now when you invoke Python or
pip, the virtual environment’s version will be used (as indicated by the(.venv)before the prompt). This can be verified as follows:(.venv) pi@raspberrypi:~/lineage $ which python /home/pi/lineage/.venv/bin/python
Install
lineage:(.venv) pi@raspberrypi:~/lineage $ pip install lineage
Start Python:
(.venv) pi@raspberrypi:~/lineage $ python Python 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>>
Use
lineage; examples shown in the README should now work.At completion of usage, the virtual environment can be deactivated:
(.venv) pi@raspberrypi:~/lineage $ deactivate pi@raspberrypi:~/lineage $
Installation on Linux¶
On Linux systems, the following system-level installs may also be required:
$ sudo apt install python3-tk
$ sudo apt install gfortran
$ sudo apt install python-dev
$ sudo apt install python-devel
$ sudo apt install python3.X-dev # (where X == Python minor version)