Python Interface on GMAT R2018a for Linux

MATLAB interface, C API, using plugins, other interfaces

Python Interface on GMAT R2018a for Linux

Postby astrojuanlu » Sun Jul 15, 2018 7:42 pm

I'm trying to make the Python interface of GMAT R2018a work on Linux. This is the message I get when I try to run the console:

Code: Select all
libpython3.6m.so.1.0: cannot open shared object file: No such file or directory
*** Library "../plugins/libPythonInterface" did not open.


I'm specifically using a derivative of Ubuntu Xenial (16.04), which ships Python 3.5. However, this is not important because I don't plan to use the system Python: I prefer to control it using virtual environments or conda environments. With this in mind, I created a conda environment with Python 3.6, but even if `which python` yields a proper Python interpreter at `/home/juanlu/.miniconda36/envs/gmat36/bin/python`, libPythonInterface.so does not seem to find it:

Code: Select all
$ which python
/home/juanlu/.miniconda36/envs/gmat36/bin/python
$ ldd $(which python) | grep python
   libpython3.6m.so.1.0 => /home/juanlu/.miniconda36/envs/gmat36/bin/../lib/libpython3.6m.so.1.0 (0x00007ff081a5e000)
$ ldd ../plugins/libPythonInterface.so | grep python
   libpython3.6m.so.1.0 => not found


Of course, changing LD_LIBRARY_PATH did the trick:

Code: Select all
$ LD_LIBRARY_PATH=/home/juanlu/.miniconda36/envs/gmat36/lib/ ldd ../plugins/libPythonInterface.so | grep python
/bin/bash: /home/juanlu/.miniconda36/envs/gmat36/lib/libtinfo.so.5: no version information available (required by /bin/bash)
   libpython3.6m.so.1.0 => /home/juanlu/.miniconda36/envs/gmat36/lib/libpython3.6m.so.1.0 (0x00007efcdb83a000)


But I would prefer not to touch that, if possible: https://gms.tf/ld_library_path-considered-harmful.html

Is there any other way to tell GMAT where to find Python?

Thanks!
astrojuanlu
 
Posts: 2
Joined: Sun Jul 15, 2018 6:59 pm

Return to External Interfaces and Plugins

Who is online

Users browsing this forum: No registered users and 2 guests

cron