Custom Python installation from YAML files

The Python environments we provide with YAML files can be installed into:

Download the OpendTect Python YAML files

Version 1.4.0 is the current version.

For Linux:

For Windows:

The YAML files contain a list of essential packages that are needed inside the Python environment. You can choose to install either the CPU only (odmlpython-cpu-mkl) or CUDA 11 one or both. In most cases the CUDA 11 one would be the best option so that the Machine Learning jobs can be run on the Nvidia GPU.

Install the environments

On Linux:

  1. Open a terminal/konsole.

  2. Then run the following:

    1. cd conda installation directory (e.g. cd /home/user/Miniconda3)

    2. cd bin

    3. bash ; source activate

    4. conda env create --file /pathto/odmlpython-cpu-mkl_lux64.yml

    5. conda env create --file /pathto/odmlpython-cuda113_lux64.yml

    6. Conda will collect the packages it needs to install from the YAML file.

    7. Then it will download and extract the packages, do the transaction and install remaining packages with pip.

On Windows:

  1. Open the Command Prompt. Run as administrator if the Python installation directory is on a location for which the user requires administrative rights.

  2. Then run the following:

    1. cd conda installation directory (e.g. cd C:\Users\user\Miniconda3)

    2. cd condabin

    3. activate.bat

    4. conda env create --file C:\pathto\odmlpython-cpu-mkl_win64.yml

    5. conda env create --file C:\pathto\odmlpython-cuda113_win64.yml


      Figure: Install Python environments from the YAML file on Windows

    6. Conda will collect the packages it needs to install from the YAML file.

    7. Then it will download and extract the packages, do the transaction and install remaining packages with pip.

    8. To make the Python environments completely operational with OpendTect 6.6's Machine Learning plugin it is necessary to get the cupti library on the system. The cupti library is only needed for the CUDA 11 environment.

    9. Finally inside OpendTect's Set Python Settings window choose the Custom Python environment and point it to your own miniconda3 or anaconda3 Python installation.

Cupti library

For Windows there are two ways to get the cupti library:

  1. You can download cupti.lib and cupti64_2021.1.1.dll.
    Then copy them into odmlpython-cuda113\Library\bin.

  2. Or you can download and install CUDA Toolkit 11.3 update 1 from the Nvidia CUDA site.
    After installation add C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\extras\CUPTI\lib64 to the system or user environment variable Path.

For information about how to use the custom environment in OpendTect 6.6 please see the chapter Setup Python Settings.

Scipy missing DLL dependencies bug

On Windows you might experience a missing DLL bug in the scipy library. When this happens the Machine Learning plugin will give an error message Inadequate Python environment for Machine Learning plugin and the details will show a traceback. This traceback includes a FileNotFoundError: Could not find module...gfortran-win_amd64.dll error.


Figure: Python environments scipy error when installed via YAML file

Scipy knows about this bug and the issue can be viewed on their GitHub page.

The following workaround has been tested and might also work for your Python environment:
Set environment variable CONDA_DLL_SEARCH_MODIFICATION_ENABLE to 1