Skip to content

Installation

GTFS4EV comes as a Python package. If this is your first time using Python, we recommend using pip or conda as package managers. Both are available on Windows, macOS, and GNU/Linux systems.

GTFS4EV has been tested with Python 3.12. While newer Python versions may work, they are not officially tested yet.

Also, we recommend installing GTFS4EV inside a dedicated virtual environment. For guidance, see:


From PyPI

GTFS4EV is available as a PyPI package. Activate your virtual environment (if any) and install the latest stable version with:

pip install gtfs4ev

From source

For developers (testing, etc), the model can be installed with:

git clone https://github.com/gtfs4ev/gtfs4ev.git
cd gtfs4ev
pip install -e .

The source code can be forked or cloned depending on the intended usage. If you clone the repository directly, make sure to create and work on your own branch instead of working the main branch.

Checking proper installation

Run any of the provided examples. See Quickstart section for minimal working case, and other examples in Examples. If the installation is successful, each example should run without errors and produce output result files.

For developers or advanced users, GTFS4EV also provides an automated test suite. When installing from source, the tests can be executed using pytest. All tests should pass.

pip install pytest
pytest

Dependency management and reproducibility

This software is currently developed and validated within a quite strictly defined Python and dependency environment (see setup.py). This design choice reflects the primary use case of GTFS4EV, where the software is intended to be executed either in CLI mode (no interaction with other python packages) or as a standalone Python workflow within a dedicated virtual environment, as is common in many research-oriented simulation packages.

While integration with other python packages is of course possible to extend functionality, the main priority of GTFS4EV is reproducibility rather than modular interoperability. Strict control over the execution environment ensures consistent and deterministic simulation outputs across runs.