Skip to content
This repository was archived by the owner on Nov 14, 2022. It is now read-only.

Installation

Dimitar Tasev edited this page Jan 19, 2021 · 23 revisions

This is for all services not included in the requirements list.

Virtual environment

To keep python packages we recommend using a python virtual environment. To do this you must install virtualenv:

pip install virtualenv

# or 

sudo apt install python3-virtualenv

Create a virtualenv:

cd autoreduction
# Please note the below assumes python 3 is your default version.
# You can specify a python executable with the -p flag e.g. virtualenv -p /path/to/python3 venv3
virtualenv venv3

And activate your virtualenv:

# Windows
venv3\Scripts\activate

# or Linux
source venv3/bin/activate

To leave your virtual python environment simply type:

deactivate

Package setup

Autoreduction uses a combination of pip and a setup.py file to perform its installation. To install the service to pip (so that packages can be found) perform a pip install:

# from the parent directory of the git clone directory, and assume the name of the git folder is autoreduction
python3 -m pip install --user -e autoreduction

-e means install in editable mode or developer mode, meaning uninstalling and installing should not be needed with repository code changes.

If any issues are encountered during the pip install - try to pip install the package manually rather than from the command above. If the manual install succeeds check if the version installed is different from the one in autoreduction/setup.py, there may be some issue with the version listed there.

Install testings requirements (development only)

Install the testing tools for the project with:

python3 -m pip install --user -r autoreduction/requirements.txt

Clone this wiki locally