How to use OpenGeode Python binding

What do you need

Python

OpenGeode is supported and continuously tested with several Python versions:

  • 3.6 and 3.7 on Windows - Visual Studio 2017
  • 3.6, 3.7 and 3.8 on Ubuntu 18.04
  • 2.7 on RHEL 7 / CentOS 7
  • 3.6, 3.7 and 3.8 on macOS X Catalina (10.15)

Pre-compiled binaries on these platforms are also provided. This page describes where to download these binaries.

Using OpenGeode bindings from release packages

The use of OpenGeode bindings is simple. It only need few steps depending on your platform.

On Windows

Configuration

  1. The bindings are located in the bin directory of the package.
  2. Add this path to the PYHTONPATH and the PATH environment variables.

Execution

  1. Open a Python script or Jupyter notebook.
  2. Import OpenGeode bindings, there is one binding for each C++ library. Example for the basic library: import opengeode_py_basic as basic.
  3. Use any OpenGeode objects, methods and functions point = basic.Point3D([0.1, 42, 54.9])

That's all! You are ready to work with OpenGeode bindings.

On Linux and macOS

Configuration

  1. The bindings are located in the lib directory of the package.
  2. Add this path to the PYHTONPATH and the LD_LIBRARY_PATH environment variables.

Execution

  1. Open a Python script or Jupyter notebook.
  2. Import OpenGeode bindings, there is one binding for each C++ library. Example for the basic library: import opengeode_py_basic as basic.
  3. Use any OpenGeode objects, methods and functions point = basic.Point3D([0.1, 42, 54.9])