Installation¶
This short guide will walk you through the required steps to set up and install life_td_data_generation.
The code in this repository is organized as a Python package named life_td_data_generation together with a set of scripts that use the functions and classes of the package. The code was written for Python 3.10 and above; earlier versions will likely require some small modifications. To get started, you will need to install the package. For this, we strongly recommend you to use a virtual environment.
Virtual Environment¶
First install virtualenv, for example with the apt (linux) package manager:
$ apt install virtualenv
Then create a virtual environment:
$ virtualenv -p python3 folder_name
And activate the environment with:
$ source folder_name/bin/activate
A virtual environment can be deactivated with:
$ deactivate
Important
Make sure to adjust the path where the virtual environment is installed and activated.
Installing the life_td package¶
Once you have set up a suitable virtualenv, clone this repository and install life_td_data_generation as a Python package:
git clone git@github.com:fmenti/life_td.git ;
cd life_td ;
pip install .
Note
If the installation does not work try installing all modules from the requirements.txt individually e.g. pip install numpy.
Once a local copy of the repository exists, new commits can be pulled from Github with:
$ git pull origin main
Testing life_td_data_generation¶
The installation can be tested by running the life_td module as a script:
$ python data_generation/life_td_data_generation/life_td.py