2. Installation

Make sure Python 3.11, 3.12 or 3.13 and pip are installed on your system

Installing the latest official release

  1. Download the optrace .tar.gz archive from the latest release

  2. Run pip install <archive> from a terminal, where <archive> is the path of the downloaded file

Installing the latest git version

Open a terminal and run: pip install "optrace @ git+https://github.com/drocheam/optrace.git"

Installing from a package index

optrace currently isn’t included in any official package index. This project is not affiliated with a package of the same name on PyPI.

Dependencies

Dependency

Description

License

chardet

automatic detection of file encoding

LGPLv2.1

mayavi

3D plotting library

BSD 3-Clause

matplotlib

2D plotting library

PSF

numpy

matrix calculations

BSD 3-Clause

opencv-python-headless

image loading, saving and resizing

Apache 2.0

pyqtdarktheme-fork

setting a QT dark theme

MIT

pyside6

Qt GUI backend

LGPLv3

scipy

specialized methods for interpolation and math

BSD 3-Clause

tqdm

animated progressbar

MPL-2.0 and MIT

Troubleshooting

  • In many cases forcing the installation of a specific library version (e.g. vtk) circumvents issues of newer releases. The syntax is: pip install --force-reinstall -v "some-package==1.2.2". Often older releases are hosted outside of PyPi, so you might try to locate the packages first. A list of other wheels for vtk is found here.

  • Consult the mayavi issues, vtk issues or PySide issues for current problems and solutions

  • Installing mayavi with no cache and without isolated building can help, see here: pip install mayavi --no-cache-dir --verbose --no-build-isolation

Notes

Due to regular installation issues and infrequent updates of mayavi to PyPI the optrace package uses a git version of mayavi. While this solves most issues, optrace can’t be published on PyPI due to this git dependency. See https://stackoverflow.com/questions/68073819/pypi-install-requires-direct-links and https://stackoverflow.com/questions/40065321/how-to-include-git-dependencies-in-setup-py-for-pip-installation#comment115929654_65527149 or https://stackoverflow.com/a/54894359.