How to install the pyCBD framework?

This section describes the necessary components and steps to take to install the CBD framework.

Dependencies

The following dependencies are required:

  • Python >= 3.6, as identified by vermin.

  • All additional libraries should be bundled with Python, so no extra installations should be needed.

Changed in version 1.5: Python 2 is no longer supported.

Next, there are some additional optional requirements:

  • Simulation:

    • tqdm when using a progress-bar of the simulation.

    • TkInter for realtime simulation using the Tk backend/platform.

  • Visualization and Plotting:

    • GraphViz for generating a graphical version of the dependency graph.

    • MatPlotLib for plotting data in Matplotlib.

    • Seaborn for plotting data using Seaborn.

    • Bokeh for plotting data in Bokeh.

  • Conversion:

  • Documentation:

Installation

There are a few ways of using the framework:

  1. Use it as a project dependency. Simply add the src/pyCBD folder to your project and import it w.r.t. the provided path.

  2. Edit the PYTHONPATH or sys.path variables to point to the src folder. This way, the execution of your program will recognize things like:

    from pyCBD.Core import CBD
    

    Tip

    Some code editors (like PyCharm) allow you to mark a directory as “Sources Root”, which basically adds it to your path upon execution.

  3. Execute one of the following commands in the src folder to install the project to your user directory or update it:

    # BUILDING:
    python setup.py install --user
    
    # UPDATING:
    python -m pip install .
    

Standalone

There are some additional standalone components that have been made to work with the framework, but can technically be used without the connection to CBDs. These are: