Installing Woo

Linux

Linux is the platform of choice for both developing and using Woo. Installation can be done in several ways.

Compilation from source

Source code is hosted at GitHub and can be otained with the Git revision control system by saying git clone https://github.com/woodem/woo.git.

Woo is written in C++17 and can be compiled with gcc>=7.0 or clang>=7.0.

Woo depends on a number of libraries. Those are in particular

  1. boost, version >= 1.48.
  2. python, version >= 3.4 (support for 2.7 is currently retained, but will be removed in the future)
  3. eigen (math routines)
  4. Qt5 and PyQt5 (optional: user interface)
  5. VTK (optional: export to Paraview)
  6. GTS (optional: manipulation of triangulated surfaces)
  7. HDF5 (optional: export to HDF5)
  8. FreeGLUT, GLE (optional: OpenGL display)
  9. A number of python modules: matplotlib (plotting), genshi (HTML export), xlrd & xlwt (XLS export), minieigen (math in python), xlib, psutil, …

Ubuntu machines can be easily set up for development with Woo using the woo-install.py <https://raw.githubusercontent.com/woodem/woo/master/scripts/woo-install.py> script. This script also installs packages neede for building.

Compilation is driven using cmake and takes a number of options; those are listed at the beginning of CMakeLists.txt.

A typical compilation might look like this:

mkdir build-directory; cd build-directory
cmake -DWOO_BUILD_JOBS=4 -GNinja /path/to/source-directory
ninja install

Virtual environment

Python allows for creation of separate Virtual environments which is an isolated working copy of Pyhon. This is useful if you want to keep multiple version of Woo around simultaneously.

Configuration (CMake) and installation should be run in the virtual environment. In that case, CMake will do the right thing to install into the virtual environment.

Distribution-specific instructions

Windows

Windows Subsystem for Linux

WSL supports running native Linux apps inside Windows. Follow official Microsoft docs to install WSL itself, choose to install Ubuntu 18.04 inside the WSL.

Once this is done, install a X-server (display server for Linux apps), we recommend VcXsrv. Woo itself will run without display server just fine but GUI will be disabled.

VcXsrv should be started with the multiple windows option, and disabling native OpenGL (see Does WSL support OpenGL?):

../_images/wsl-vcxsrv-opengl.png

You can install Woo from source as usual, you can also use script to install from source; in the terminal, type:

$ wget https://raw.githubusercontent.com/woodem/woo/master/scripts/woo-install.py
$ python3 woo-install.py

Once the compilation finishes, you should be able to run woo as normally in Linux. You have to set the DISPLAY environment variable (by hand, or export it in ~/.bashrc to be set automatically. Shortcuts might not work in the Windows terminal (under investigation), you might need to type woo.qt.Controller() to open the controller window.

../_images/wsl-controller.png

Uninstallation

To uninstall the current installation of Woo from your machine (which is useful e.g. when switching from packaged version to locally compiled one or vice versa), the following steps will clean installed files depending on the method you used to install Woo.

Compilation from source

If you used the default PREFIX value for scons, run the following command:

rm -rf ~/.local/lib/python3.6/site-packages/woo* ~/.local/bin/woo*

This will delete executables (woo and woo-batch) and modules. Be careful and check first there are not other woo* files installed in that location (unlikely, but possible).

Virtual Environment
If you created the environment for Woo, you can simply delete all of it. Otherwise, follow the steps for source-compiled uninstallation, altering paths accordingly.
Debian/Ubuntu packages

Uninstall the package the standard way, from package manager or by saying:

sudo apt-get remove python3-woo

Tip

Ask questions or report issues at github.