Custom Python installation from YAML files
The Python environments we provide with YAML files can be installed into:
-
your own miniconda3 installation or into
-
your own anaconda3 installation.
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:
-
Open a terminal/konsole.
-
Then run the following:
-
cd conda installation directory (e.g. cd /home/user/Miniconda3)
-
cd bin
-
bash ; source activate
-
conda env create --file /pathto/odmlpython-cpu-mkl_lux64.yml
-
conda env create --file /pathto/odmlpython-cuda113_lux64.yml
-
Conda will collect the packages it needs to install from the YAML file.
-
Then it will download and extract the packages, do the transaction and install remaining packages with pip.
-
On Windows:
-
Open the Command Prompt. Run as administrator if the Python installation directory is on a location for which the user requires administrative rights.
-
Then run the following:
-
cd conda installation directory (e.g. cd C:\Users\user\Miniconda3)
-
cd condabin
-
activate.bat
-
conda env create --file C:\pathto\odmlpython-cpu-mkl_win64.yml
-
conda env create --file C:\pathto\odmlpython-cuda113_win64.yml
Figure: Install Python environments from the YAML file on Windows -
Conda will collect the packages it needs to install from the YAML file.
-
Then it will download and extract the packages, do the transaction and install remaining packages with pip.
-
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.
-
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:
-
You can download cupti.lib and cupti64_2021.1.1.dll.
Then copy them into odmlpython-cuda113\Library\bin. -
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
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