Topology ToolKit


Installation
Please find below detailed instructions for the binary installation of TTK under MacOS. These pre-built packages are compiled for x86_64 architectures and MacOS 12 using Python 3.12.

1. Downloading the packages

Please checkout and review our download page and download the following packages:
 · ttk-paraview-v5.13.0-macos-12.tar.gz
 · ttk-1.3.0-macos-12.tar.gz

2. Installing dependencies with Homebrew

To install TTK's dependencies, we recommand to MacOS users to use the Homebrew package manager. Please checkout Homebrew's installation page to download and install Homebrew.

We will assume in the remainder that you installed Homebrew on your system successfully, under default directories.

To install TTK's and ParaView's dependencies, open a terminal and enter the following commands (omit the $ character):

$ brew reinstall python
$ brew install --cask xquartz
$ brew install glew ninja mesa qt@5
$ brew install boost eigen graphviz llvm numpy qhull spectra sqlite zlib

2. ParaView installation

Installation by default will place files in /usr/local, however you could install into a different directory and adjust the paths as indicated below. To install TTK's version of ParaView, open a terminal and enter the following command (omit the $ character):

$ mkdir ~/ttk-binary
$ mv ~/Downloads/ttk-paraview-v5.13.0-macos-12.tar.gz ~/ttk-binary
$ cd ~/ttk-binary
$ tar xzvf ttk-paraview-v5.13.0-macos-12.tar.gz
$ sudo cp -r ttk-paraview/* /usr/local

3. TTK installation

To install TTK, open a terminal and enter the following command (omit the $ character):

$ mv ~/Downloads/ttk-1.3.0-macos-12.tar.gz ~/ttk-binary
$ cd ~/ttk-binary
$ tar xzvf ttk-1.3.0-macos-12.tar.gz
$ sudo cp -r ttk/* /usr/local

4. Setting up environment variables

At this point, for an optimal user experience, we recommend users to define the following environment variables (in particular, when using TTK with python). This can be done by entering the following commands (omit the $ character):

$ echo "export CMAKE_PREFIX_PATH=$(brew --prefix qt@5)/lib/cmake:$CMAKE_PREFIX_PATH" >> ~/.zshrc
$ echo "export PYTHONPATH=${PYTHONPATH}:/usr/local/lib/python3.12/site-packages/" >> ~/.zshrc
$ echo "export PV_PLUGIN_PATH=${PV_PLUGIN_PATH}:/usr/local/lib/plugins/" >> ~/.zshrc
$ echo "export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:/usr/local/lib" >> ~/.zshrc (this is only necessary if installed somewhere other than /usr/local, changed to your install directory)
$ echo "export PATH=${PATH}:/usr/local/bin/" >> ~/.zshrc (this is only necessary if installed somewhere other than /usr/local, changed to your install directory)
$ source ~/.zshrc

Optionally, the following optional dependency can be installed with pip (if present on the system):
$ pvpython -m pip install scikit-learn. If pvpython is not found or creates an error, this indicates either your PATH or PYTHONPATH variable is not set correctly.

5. Checking your TTK installation

If you applied all the above steps successfully, you can now open a terminal and type the following command to load your TTK-patched ParaView:

$ paraview

If paraview does not load correctly or creates an error, this may indicate either your PATH or DYLD_LIBRARY_PATH variable is not set correctly. Likewise, for the examples tested below, they might reveal issues with the PV_PLUGIN_PATH variable.

When executing downloaded packages from the command line, MacOS will likely trigger a security warning. To fix, open System Preferences and switch to the Privacy & Security panel. Under the General tab you should be able to find an option to Allow Anyway. If all works, you should see the following TTK startup screen:



On this screen, clicking on the "Example Visualizations" link should bring you to the TTK built-in example screen:



From there, clicking on one of the three buttons should generate one of the following three visualizations:







If this is the case, congratulations!
You have just successfully installed TTK on your system!

Now, please visit our tutorial page to watch video tutorials showing how to use TTK with ParaView with concrete examples and how to use it from your own Python or C++ code or how to extend TTK by writing up your own module!