forked from aibasel/lab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL.txt
39 lines (29 loc) · 1.43 KB
/
INSTALL.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Install Lab
-----------
Lab supports Python 3.6+. We recommend installing Lab in a `Python
virtual environment <https://docs.python.org/3/tutorial/venv.html>`_.
This has the advantage that there are no modifications to the
system-wide configuration, and that you can create multiple environments
with different Lab versions (e.g., for different papers) without
conflicts::
# Install required packages, including virtualenv.
sudo apt install python3 python3-venv
# Create and activate a Python 3 virtual environment for Lab.
python3 -m venv lab-venv # or any other path instead of lab-venv
source lab-venv/bin/activate
# Install Lab in the virtual environment.
pip install -U pip # Upgrade to latest pip version.
pip install lab # or a specific version with lab==x.y
If you want to install the latest development version and/or need to
change Lab itself, you can clone the Lab repo and install it in the
virtual environment::
git clone https://github.com/aibasel/lab.git /path/to/lab
pip install --editable /path/to/lab
The ``--editable`` flag installs the project in "editable mode", which
makes any changes under ``/path/to/lab`` appear immediately in the
installed package.
Please note that before running an experiment script you need to
activate the virtual environment with::
source lab-venv/bin/activate
We recommend clearing the ``PYTHONPATH`` variable before activating the
virtual environment.