Using Python 3.6 with MAJA

Hi All,

I am currently evaluating the effort of migrating my system from MAJA 3.3 to MAJA 4.5.
I encountered a few minor issues, but I will come back to those later.
My main concern for the moment is that it seems Start Maja / MAJA is using a python 3.7 installed with MAJA while my system (CentOS 7.9.2009) is configured with a Python 3.6.8, which leads to this error:

File “/usr/local/lib64/python3.6/site-packages/osgeo/init.py”, line 11, in swig_import_helper
fp, pathname, description = imp.find_module(’_gdal’, [dirname(file)])
File “/home/Monitoring/MAJA4.5/lib/python3.7/imp.py”, line 296, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named ‘_gdal’

Is there a way to use my Python 3.6 instead of the 3.7 ? Or how do I prevent this mix between the 2 Python configurations (will I then have to change my GDAL installation) ?

Thanks !

Sebastien

May be the problem is that I should install GDAL 3.4 instead of my 2.4.2…
Continuing my investigations…

Hi,

the Maja 4.x package contains python 3.7 itself so you only have to source the maja environment by doing “source /path/to/Maja/install/bin/.majaenv.sh” before trying to launch Maja. no need to install gdal yourself also as it is contained in the maja package (GDAL 2.4). When sourcing the environment it will add the correct python to your PATH and you will be able to launch maja.

Let us know if it helps,
Sincerely yours,
Maja Team

Thanks a lot for the answer
In the mean time I installed GDAL 3.2 and the corresponding python module and it is working properly
I guess I could use the provided virtualenv, but I launch MAJA from another python script and hence have my own virtualenv configured for my scripts needs
By the way, I did not see that virtualenv mentionned in the documentation, is there a more complete documentation somewhere ? (and I guess you mean GDAL 3.4 and not 2.4 ?)

That’s a good news that you finaly came to a solution,

In the Readme of the project, there is a section where the virtualenv is mentionned :

If you have your own virtualenv you have to adapt the variables present in this script.
There is no more complete documentation unfortunatly.

I meant GDAL 2.4, because until Maja 4.5 we still use GDAL 2.4. GDAL 2 => 3 will be done in Maja 4.6 which is expected in February

Best Regards,

Maja Team