Commit 83bda41d authored by Cédric Traizet's avatar Cédric Traizet

DOC: add documentation on Python bindings re compilation

parent f293db88
Pipeline #4278 passed with stages
in 78 minutes and 14 seconds
......@@ -96,6 +96,23 @@ to select their own existing Python installation rather than the one dibstribute
By default, bindings for Python 3.5 will be enabled with the ``otbenv`` script.
Recompiling Python bindings
+++++++++++++++++++++++++++
If you are using another version of Python 3 than 3.5, but still want to use OTB Python bindings, it is possible
to compile the python again with your version of Python. CMake is required (it is available in most package
managers or at [https://cmake.org/]). At the root of the OTB installation run :
.. parsed-literal::
source otbenv.profile
ctest -S share/otb/swig/build_wrapping.cmake -VV
You should now be able to import ``otbApplication`` through Python !
Alternatively, you could use a virtual env or otb Conda Package to use the OTB Python bindings.
Notes:
~~~~~~
......@@ -112,8 +129,8 @@ Notes:
FAQ
~~~
Q: Unable to import otbApplication library with Python3
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
Q: Unable to import otbApplication library with Python3.5
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
::
......
......@@ -44,7 +44,7 @@ supplied script ``tools/uninstall_otb.sh``.
Python bindings
~~~~~~~~~~~~~~~
Since OTB 6.7.0 OTB bindings for Python 3.5 are distributed as a binary
Since OTB 6.7.0 OTB bindings for Python 3.7 are distributed as a binary
package.
Please note that using a different Python version may not be compatible with
OTB wrappings. If the installation completes
......@@ -54,7 +54,20 @@ You must have Python numpy bindings installed in your system. They can be instal
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.
By default, bindings for Python 3.5 will be enabled with the ``otbenv`` script.
By default, bindings for Python 3.7 will be enabled with the ``otbenv`` script.
Recompiling Python bindings
+++++++++++++++++++++++++++
If you are using another version of Python 3 than 3.7, but still want to use OTB Python bindings, it is possible
to compile the python again with your version of Python. CMake is required (it is available in Brew or at [https://cmake.org/]). At the root of the OTB installation run :
.. parsed-literal::
source otbenv.profile
ctest -S share/otb/swig/build_wrapping.cmake -VV
You should now be able to import ``otbApplication`` through Python !
Notes:
~~~~~~
......
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