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 Mar 16, 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
virtualenv -p /path/to/python3 venv3

# or

python3 -m virtualenv -p /path/to/python3 venv3

And activate your virtualenv:

# Windows
venv3\Scripts\activate

# or Linux (optionally you can add this to your ~/.bashrc to start the virtual environment automatically)
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.

Note: --user is not needed when using a virtualenv (only needed if installing on the system python)

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 testing requirements (development only)

Install the testing tools for the project with:

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

Continuing on

Once you have installed the requirements, you are ready to start setting up the environment to allow running the application. Continue in the Setup page.

Clone this wiki locally