Improve and update docs for a working Python installation
Today I had to help a colleague who was having trouble running import otbApplication
.
This is something I see a lot here in the Maison de la Télédétection with linux newbies / interns that needs OTB and are confused by the docs.
The CookBook is well updated regarding Python related caveats.
Nonetheless there are still missing recommendations for some specific cases and versions.
Especially regarding conda, since the latest package version updated there is 7.1. And it seems everyone is using conda (I believe this is hell).
We need a section about how to import the python API of a fresh binary installation, within a conda env.
May be I can create a MR - I still need to learn the the docs contribution workflow.
Here is what I suggest :
- May be update the FAQ section about the libpython3.5 symlink with current python versions, or both
- Warn that python-otb is missing in any recent ubuntu distributions (even in ubuntugis - is it fixable ?)
- Extend the conda section, add command line examples to create a working conda env (py37 or py38 + symlinks for libpython on Linux)
- Add a section about Jupyter / Google Colab environments
- I sometimes had to downgrade numpy in order to recompile bindings, I don't know about the state of this in v8.0, is there a max version number that we can provide ?
- Explain this "recompile python bindings" thing will not work every time
(this only work when using the python exe found in /usr - I was unable to use it for a conda env - using python > 3.8)
Regarding this last point, it would be really great to ease the process and also create a dedicated shell script, that support any PYTHON_EXE.
I really have a hard time to understand this ctest trick, and was unable to adapt it to my env needs.
And what about Windows ? For example if I want to run OTB with python 3.10, is this even possible ?