Commit 8714d7e4 authored by Manuel Grizonnet's avatar Manuel Grizonnet

Merge branch...

Merge branch '1540-python3-otb-application-bindings-available-in-the-otb-package-don-t-work-on-linux' into 'develop'

Resolve "Python3 OTB application bindings available in the OTB package don't work on Linux"

Closes #1540

See merge request orfeotoolbox/otb!40
parents b594771a 2311ea4d
......@@ -3,9 +3,9 @@ Installation
We provide different standalone binary packages for OTB-Applications:
- for Windows platform (7 or higher)
- for Windows platform (Seven or higher)
- for 64bit Linux distribution
- for 64 bits Linux distribution
- for MacOS X
......@@ -21,17 +21,17 @@ You can get latest binary packages from our `Download page <https://www.orfeo-to
Windows
-------
.. include:: Installation_Windows.txt
.. include:: Installation_Windows.rst
Linux x86_64
Linux
------------
.. include:: Installation_Linux.txt
.. include:: Installation_Linux.rst
MacOS X
-------
.. include:: Installation_Macx.txt
.. include:: Installation_Macos.rst
Other packages
--------------
......
......@@ -91,9 +91,9 @@ OTB wrappings. If no compatible Python 2.x version is found a
notification is generated during the installation process. If the installation completes
without issue, information relating to your Python bindings will be provided.
You must have Python numpy bindings installed in your system. They can be installed locally
You must have Python NumPy bindings installed in your system. They can be installed locally
without admin rights as follows: "pip install --user numpy". This is to give users the option
to select their own existing Python installation rather than the one dibstributed by the OTB package.
to select their own existing Python installation rather than the one distributed by the OTB package.
By default, bindings for Python 2.7 will be enabled with the ``otbenv`` script.
If you want to use bindings for Python 3.5, you can copy this script and modify:
......@@ -115,38 +115,21 @@ Notes:
FAQ
~~~
Q: I am getting an error message...
Q: Unable to import otbApplication library with Python3
+++++++++++++++++++++++++++++++++++
::
Cannot mix incompatible Qt library (version 0x40806) with this library (version 0x40807)
Aborted
ImportError: libpython3.5m.so.rh-python35-1.0: cannot open shared object file: No such file or directory
A: This is due to a conflict with system Qt4 (usually seen on KDE) and Qt4 + gtk libs in OTB package. The fix you need is to remove those libs from package.
A: You need to add a symlink to libpython3.5m.so.rh-python35-1.0 to make it works.
.. parsed-literal::
cd /path/to/OTB-|release|-Linux64
rm -f lib/libQt* && rm -fr lib/gtk
Q: Monteverdi and Mapla applications look different from my other applications.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A: In versions 6.0, Monteverdi, Mapla and otbapplication (otbgui\_\*)
use the system gtk theme. If you can't install GTK on your system you can use the
one distributed with the OTB package. Note that using system GTK is the preferred
way with the OTB standalone package as the distributed version of GTK do not
work on recent Linux distributions.
To use the distributed GTK libraries you need to set the OTB_USE_LOCAL_GTK:
::
export OTB_USE_LOCAL_GTK=1
Here is the solution:
And now start ``monteverdi.sh`` or ``mapla.sh`` from OTB-6.0.0-Linux64
To get back default behaviour, unset OTB_USE_LOCAL_GTK=1 or set OTB_USE_LOCAL_GTK=0
- find the libpython3.5XX on your system : find /usr/lib -iname *libpython3.5*
(on Ubuntu 14.04, it is /usr/lib/x86_64-linux-gnu/libpython3.5m.so)
- create a symlink : ln -s path/to/lib/python3.5XX
path/to/lib/libpython3.5m.so.rh-python35-1.0
- Try to import otbApplication again
In version 6.2 and older, the Linux binaries are built without GTK support to cut some
dependencies.
See this discussion on `OTB issue tracker <https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/issues/1540#note_67864>`_
README
OTB recipes to build standalone binary packages for Windows/Linux/Mac OS X
......@@ -22,11 +22,11 @@ macro(installer_files)
#configure README from rst docs
set(RSTDOC_DIR "${PACKAGE_OTB_SRC_DIR}/Documentation/Cookbook/rst")
if(APPLE)
set(README_FILE ${RSTDOC_DIR}/Installation_Macx.txt)
set(README_FILE ${RSTDOC_DIR}/Installation_Macos.rst)
elseif(LINUX) #not osx
set(README_FILE ${RSTDOC_DIR}/Installation_Linux.txt)
set(README_FILE ${RSTDOC_DIR}/Installation_Linux.rst)
elseif(WIN32) #windows
set(README_FILE ${RSTDOC_DIR}/Installation_Windows.txt)
set(README_FILE ${RSTDOC_DIR}/Installation_Windows.rst)
endif()
configure_file("${README_FILE}" ${CMAKE_BINARY_DIR}/README )
install(FILES ${CMAKE_BINARY_DIR}/README DESTINATION ${PKG_STAGE_DIR} )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment