Skip to content
Snippets Groups Projects
Commit 8714d7e4 authored by Manuel Grizonnet's avatar Manuel Grizonnet
Browse files

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 !40
parents b594771a 2311ea4d
No related branches found
No related tags found
No related merge requests found
...@@ -3,9 +3,9 @@ Installation ...@@ -3,9 +3,9 @@ Installation
We provide different standalone binary packages for OTB-Applications: 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 - for MacOS X
...@@ -21,17 +21,17 @@ You can get latest binary packages from our `Download page <https://www.orfeo-to ...@@ -21,17 +21,17 @@ You can get latest binary packages from our `Download page <https://www.orfeo-to
Windows Windows
------- -------
.. include:: Installation_Windows.txt .. include:: Installation_Windows.rst
Linux x86_64 Linux
------------ ------------
.. include:: Installation_Linux.txt .. include:: Installation_Linux.rst
MacOS X MacOS X
------- -------
.. include:: Installation_Macx.txt .. include:: Installation_Macos.rst
Other packages Other packages
-------------- --------------
......
...@@ -91,9 +91,9 @@ OTB wrappings. If no compatible Python 2.x version is found a ...@@ -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 notification is generated during the installation process. If the installation completes
without issue, information relating to your Python bindings will be provided. 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 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. 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: If you want to use bindings for Python 3.5, you can copy this script and modify:
...@@ -115,38 +115,21 @@ Notes: ...@@ -115,38 +115,21 @@ Notes:
FAQ 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) ImportError: libpython3.5m.so.rh-python35-1.0: cannot open shared object file: No such file or directory
Aborted
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:: Here is the solution:
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
And now start ``monteverdi.sh`` or ``mapla.sh`` from OTB-6.0.0-Linux64 - find the libpython3.5XX on your system : find /usr/lib -iname *libpython3.5*
To get back default behaviour, unset OTB_USE_LOCAL_GTK=1 or set OTB_USE_LOCAL_GTK=0 (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 See this discussion on `OTB issue tracker <https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/issues/1540#note_67864>`_
dependencies.
README OTB recipes to build standalone binary packages for Windows/Linux/Mac OS X
...@@ -22,11 +22,11 @@ macro(installer_files) ...@@ -22,11 +22,11 @@ macro(installer_files)
#configure README from rst docs #configure README from rst docs
set(RSTDOC_DIR "${PACKAGE_OTB_SRC_DIR}/Documentation/Cookbook/rst") set(RSTDOC_DIR "${PACKAGE_OTB_SRC_DIR}/Documentation/Cookbook/rst")
if(APPLE) if(APPLE)
set(README_FILE ${RSTDOC_DIR}/Installation_Macx.txt) set(README_FILE ${RSTDOC_DIR}/Installation_Macos.rst)
elseif(LINUX) #not osx elseif(LINUX) #not osx
set(README_FILE ${RSTDOC_DIR}/Installation_Linux.txt) set(README_FILE ${RSTDOC_DIR}/Installation_Linux.rst)
elseif(WIN32) #windows elseif(WIN32) #windows
set(README_FILE ${RSTDOC_DIR}/Installation_Windows.txt) set(README_FILE ${RSTDOC_DIR}/Installation_Windows.rst)
endif() endif()
configure_file("${README_FILE}" ${CMAKE_BINARY_DIR}/README ) configure_file("${README_FILE}" ${CMAKE_BINARY_DIR}/README )
install(FILES ${CMAKE_BINARY_DIR}/README DESTINATION ${PKG_STAGE_DIR} ) install(FILES ${CMAKE_BINARY_DIR}/README DESTINATION ${PKG_STAGE_DIR} )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment