Skip to content
Snippets Groups Projects
Commit eb39541c authored by Thibaut ROMAIN's avatar Thibaut ROMAIN
Browse files

DOC: add a note for windows users about pythonAPI for the need to add dll...

DOC: add a note for windows users about pythonAPI for the need to add dll directory before import otbApplication
parent ff4190a6
No related branches found
No related tags found
1 merge request!1059ENH: Add a one line otb installer
Pipeline #16550 failed
...@@ -9,6 +9,20 @@ environment script ``otbenv`` to properly setup variables such as ...@@ -9,6 +9,20 @@ environment script ``otbenv`` to properly setup variables such as
source the script). In other cases, you should set these variables depending on source the script). In other cases, you should set these variables depending on
your configuration. your configuration.
Important Note for Windows Users
--------------------------------
On Windows, since Python 3.8, you have to add a call to os.add_dll_directory to be able to import modules
that are not installed on your default PYTHONPATH.
.. code-block:: python
import os
os.add_dll_directory("/Path/To/OTB_INSTALL/lib/otb/python")
os.add_dll_directory("/Path/To/OTB_INSTALL/lib/")
import otbApplication as otb
Once your environment is set, you can use OTB applications from Python, just Once your environment is set, you can use OTB applications from Python, just
like this small example: like this small example:
......
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