OTB conda installation on WSL

Dear OTB Team

I get the next mesage “UnsatisfiableError” when i try to install OTB on Ubuntu Virtual Machine based on Windows SubSystem For Linux 2 .

I try to change all the python3 versions, but the error persist.

Hello,

I have the same problem on ubuntu.

Looks like the package is broken. I will look into it,

Sorry for the inconvenience

Cédric

Dear @jsvinasco,
An issue was open here, if you want to follow-up.
Kind regards.
Julien

1 Like

Such an obvious issue and there is no update during 1 year !

1 Like

Just the last update on my failing to install and call OTB with anaconda on Fedora 32 :
I did

conda create -n pyOTB --channel orfeotoolbox --channel conda-forge otb

A new environment is created together with OTB 7.1 package but when I do :

import otbApplication as otb

In python, I get this error:

(pyOTB) [sina@snakhost ~]$ python
Python 3.8.6 | packaged by conda-forge | (default, Oct  7 2020, 19:08:05) 
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import otbApplication as otb
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/sina/anaconda3/envs/pyOTB/lib/otb/python/otbApplication.py", line 28, in <module>
    _otbApplication = swig_import_helper()
  File "/home/sina/anaconda3/envs/pyOTB/lib/otb/python/otbApplication.py", line 24, in swig_import_helper
    _mod = imp.load_module('_otbApplication', fp, pathname, description)
  File "/home/sina/anaconda3/envs/pyOTB/lib/python3.8/imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "/home/sina/anaconda3/envs/pyOTB/lib/python3.8/imp.py", line 342, in load_dynamic
    return _load(spec)

I am not a OTB Developer but here one possibly error, the Python bindings are only avaible natively for Python 3.5.
The more easy solution that I can think is use the OTB package for anaconda provide by the Iota-2 project in the following link: Otb :: Anaconda.org

Regards,
Juan

1 Like

Thanks Juan,
Unfortunately this also seems to take you into an impossible loop of (Incompatibility) Errors. Bellow is the result of attampt with iota2 installation:

Specifications:

  • otb → python=3.6

Your python: python=3.7

If python is on the left-most side of the chain, that’s the version you’ve asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.

The following specifications were found to be incompatible with your system:

  • feature:/linux-64::__glibc==2.31=0
  • feature:|@/linux-64::__glibc==2.31=0
  • otb → libgcc-ng[version=’>=9.3.0’] → __glibc[version=’>=2.17’]

Your installed version is: 2.31

For avoid this incompatibility issue you need follow the next instructions.

This flow will install Iota-2 env for you that include OTB but also a lot of other libraries so is not the best solution.
I suggests use the Step 3 bis version in this way the installation will be using mamba and is faster. Also for avoid innecesary dependencies change the # install iota2 step for the follow.

conda install -c iota2 otb

Don’t forget the .condarc configuration, without this step this process won’t work.

After the installation activate again the environment in a new terminal session.

1 Like

Thanks again for this clarification.
I updated conda and changed .condarc then I went through the Step 3 bis line by line and as you mentioned replaced the # install iota2 step by the one you mentioned. Now I have the iota2-env with otb 7.1 installed in it, but when I run python and try importing otb I get this

import otbApplication as otb
Traceback (most recent call last):
File “”, line 1, in
File “/home/sina/anaconda3/envs/iota2-env/lib/otb/python/otbApplication.py”, line 15, in
import _otbApplication
ImportError: libnsl.so.1: cannot open shared object file: No such file or directory

======================================
In addition I have a question about the way mamba is installed here in this procedure. The actual mamba page printed a Warning saying: “Installing mamba into any other environment than base can cause unexpected behavior”.
This is what exactly we have done through this procedure isn’t it ? As a matter of fact we install mamba but we use conda to install iota2 isn’t it ?

Thank you very much for your time and response,
Sina