Installation

Following Sections provide overview on how to install the tessif-phd version of tessif. Python 3.8 is recommend.

Standard

Linux

  1. Make sure to have python3, graphviz and coinor-cbc installed on your system. Use your software management of choice to install them. Most Linux distributions have them in their repository.

  2. Create a new directory and change to it:

    mkdir /path/to/dir
    cd /path/to/dir
    
  3. Clone the git repository for tessif-phd

    git clone https://github.com/tZ3ma/tessif-phd.git
    
  1. Create a new virtual environment and activate it:

    python3 -m venv your_env_name
    source your_env_name/bin/activate
    
  2. Make sure pip, setuptools and wheel are up to date:

    pip install -U pip setuptools wheel
    
  3. Install tessif-phd and it’s requirements:

    pip install tessif-phd/
    
  4. After installation is done you can check if everything went according to plan by executing tessif’s tests. Do so by entering:

python tests/nose_testing.py

Windows

See the development guide and replace step 9b with:

pip install .

Development

Linux

  1. Make sure to have python3, graphviz and coinor-cbc installed on your system. Use your software management of choice to install them. Most Linux distributions have them in their repository.

  2. Create a new directory and change to it:

    mkdir /path/to/dir
    cd /path/to/dir
    
  3. Clone the git repository for tessif-phd

    git clone https://github.com/tZ3ma/tessif-phd.git
    
  4. Create a new virtual environment and activate it:

    python3 -m venv your_env_name
    source your_env_name/bin/activate
    
  5. Make sure pip, setuptools and wheel are up to date:

    pip install -U pip setuptools wheel
    
  6. Install tessif-phd and it’s requirements:

    pip install -e tessif-phd/[dev]
    
  7. Currently there is a minor version conflict. After installation, update dash and ignore the error, since tessif-phd is not plotting via calliope:

    pip install -U dash
    
  8. After installation is done you can check if everything went according to plan by executing tessif’s tests. Do so by entering:

    python tests/nose_testing.py
    
  9. (Optional) Build your own (html) documentation using Sphinx:

    cd tessif-phd/docs/
    make html
    

    If the build was succesfull you can browse the documentation using your favorite browser by opening

    tessif-phd/docs/build/html/index.html
    

    Note

    Sphinx supports a variety of different builders such as Latex or ePub.

Windows

  1. Install all prerequisites:

    1. Install python (Use 3.8.x for as there are no scipy wheels for 3.9 right now).

    2. Download CBC (64 or 32 bit)

    3. Install glpk

      (add both the cbc binary and the glpk binary to PATH as described in the guide for glpk)

    4. Install git

    5. Install/Open PowerShell Core

    6. Install graphviz: (See this guide)

      1. Download graphviz for Windows.

      2. Run the installer. Make sure to select one of the options to add graphviz to PATH.

      3. Open the command prompt as administrator:

        1. Press the Windows-Key

        2. Type cmd

        3. Click Run as administrator

      4. Type dot -c and press Enter

      5. If no warning message is returned, the installation was successfull.

    7. Install Libxml2 (See this guide )

      1. Download Libxml2

      2. Create a new folder (if you wish to make it available for all users something like C:\Program Files\Libxml2 works)

      1. Add Libxml2 to the PATH Variable

        1. Go to Control Panel\All Control Panel Items\System/Advanced system settings (Systemsteuerung\System und Sicherheit\System\Erweiterete Systemeinstellung) .

        2. On the tab Advanced (Erweitert) select Environment Variables (Umgebungsvariablen).

        3. Click on System variables (Systemvariablen) and add the desired path

    8. Install the Microsoft Build Tools for C++

  2. Open PowerShell (Core) as Administrator and create a new directory and change to it:

    mkdir \path\to\dir
    cd \path\to\dir
    
  3. Clone the git repository for tessif-phd

    git clone https://github.com/tZ3ma/tessif-phd.git
    
  1. Create a new virtual environment and activate it:

    1. If you only have python 3.x.x installed:

      python -m venv your_env_name
      \path\to\env\Scripts\activate
      
    2. If you have multiple versions of python installed

      (where 3.x would mean 3.8 at this point in time (2023-03-)):

      py -3.x.x  -m venv \path\to\env\
      \path\to\env\Scripts\activate
      
  2. Update pip

    (with your activated virtual environment):

    python -m pip install --upgrade pip
    
  3. Make sure setuptools and wheel are up to date:

    pip install -U setuptools wheel
    
  4. Install PyGraphviz

    1. Download the latest pygraphvix win .whl (For example pygraphviz‑1.6‑cp38‑cp38‑win_amd64.whl) Make sure that the number behind cp matches your python version. i.e cp38 for python 3.8.x

    2. Install the scipy wheel using pip:

      pip install path\to\whl such as 'Downloads\pygraphviz‑1.6‑cp38‑cp38‑win_amd64.whl'
      
  5. Install tessif-phd and it’s requirements:

    1. Change into the tessif-phd top folder (somhow on windows this is necessary)

      cd tessif-phd
      
    2. Install tessif-phd in development mode:

      pip install -e ./[dev]
      
    3. Currently there is a minor version conflict. After installation, update dash and ignore the warning, since tessif is not plotting via Calliope:

      pip install -U dash
      
  6. After installation is done you can check if everything went according to plan by executing tessif’s tests. Do so by entering (assuming you’re still inside of where you cloned tessif-phd to):

python tests/nose_testing.py
  1. (Optional) Build your own (html) documentation using Sphinx:

cd tessif-phd/docs/
.\make html

If the build was succesfull you can browse the documentation using your favorite browser by opening

tessif-phd/docs/build/html/index.html

Note

Sphinx supports a variety of different builders such as Latex or ePub.