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 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`, does not seem to find it:

Code: Select all
$ which python
$ ldd $(which python) | grep python => /home/juanlu/.miniconda36/envs/gmat36/bin/../lib/ (0x00007ff081a5e000)
$ ldd ../plugins/ | grep python => 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/ | grep python
/bin/bash: /home/juanlu/.miniconda36/envs/gmat36/lib/ no version information available (required by /bin/bash) => /home/juanlu/.miniconda36/envs/gmat36/lib/ (0x00007efcdb83a000)

But I would prefer not to touch that, if possible:

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

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

Re: Python Interface on GMAT R2018a for Linux

Postby n3rdx » Mon Nov 26, 2018 1:35 pm

You may have already solved this by this time, I just posted a note on my experiences with Python + R2018a + CMAKE (see Compiling forum).

When CMAKE-GUI showed me what it thought it found in parsing my system, after a few tries, and failing with Python interface build - I noticed CMAKE had selected Python 2. Python 3 was already on my system, but python3-dev was not. Fix was to install the development libraries ('sudo apt-get install python3-dev' IIRC) and then all worked well.

Samudra N3RDX
Posts: 7
Joined: Mon Jun 19, 2017 2:07 am
Location: Washington, DC

Return to External Interfaces and Plugins

Who is online

Users browsing this forum: No registered users and 1 guest