Skip to content

Developer guides – Installation

Nikkel Mollenhauer edited this page Jul 25, 2022 · 4 revisions

This page includes information about how to install additional dependencies needed when further developing the recommerce simulation framework. For general installation instructions, see the Quick Start Guide after following the installation instructions on this page.

Installing development dependencies

If you have not yet done so, install anaconda and run the following command to create an environment and install the required packages from the environment.yml:

conda env create -n <your_venv_name>

where <your_venv_name> is the name the environment should have.

To activate your created environment use:

conda activate <your_venv_name>

To update an already existing environment with the needed packages run the following command:

conda env update -n <your_venv_name>

If version numbers have changed in the environment.yml it can happen that anaconda finds conflicts and tries resolving them without succeeding. In this case you may need to reinstall the packages. Deactivate your environment before proceeding, otherwise anaconda cannot perform the commands:

conda uninstall -n <your_venv_name> --all
conda env update -n <your_venv_name>

This will first uninstall all packages and then re-install them from the environment.yml.

Dependency installation troubleshooting

If you get the following error message when trying to access the docker SDK after (re)installing the conda environment (e.g. by starting the API through docker/app.py):

docker.errors.DockerException: Install pypiwin32 package to enable npipe:// support

you have to run the pywin32_postinstall.py script. To do so, run the following command:

python Path/To/Anaconda3/Scripts/pywin32_postinstall.py -install

Adding dependencies

When adding new dependencies to the project, you first need to determine whether they are needed for running the simulation framework itself (an example would be numpy), or for development of the package (an example would be pytest).

Necessary dependencies

If the dependency is needed for running the simulation framework, it needs to be added to the setup.cfg file. Please see this page for more information.

Development dependencies

If the dependency is only needed for developers, we do not want to include it in the pip package. Therefore, add it to the environment.yml file, which installs it through the anaconda environment.