MHKiT-MATLAB
MHKiT-MATLAB copied to clipboard
MHKiT with MATLAB R2022b , Anaconda, Python 3.9, on Ubuntu 22.04 LTS
I'm trying to get MHKiT working with MATLAB R2022b and Anaconda with Python 3.9 on Ubuntu 22.04 LTS, but I'm having some problems.
I cloned both MHKiT-Python and MHKiT-MATLAB and then installed them both (i.e., mhkit
and mhkit-python-utils
) into my Anaconda environment using pip install -e .
Then I start MATLAB R2022b and installed the MHKiT toolbox which reports success, however, the following does not work in MATLAB:
[x,y]=circular(30)
Error using _linprog_highs><module>
Python Error: ImportError: /opt/MATLAB/R2022b/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6:
version `GLIBCXX_3.4.29' not found (required by
~/anaconda3/lib/python3.9/site-packages/scipy/optimize/_highs/_highs_wrapper.cpython-39-x86_64-linux-gnu.so)
I have GLIBCXX_3.4.29 in ~/anaconda3/lib/libstdc++.so.6
but GLIBCXX_3.4.28
is highest version in
/opt/MATLAB/R2022b/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6
If I try to tell MATLAB to use ~/anaconda3/lib/libstdc++.so.6
by doing
LD_PRELOAD=/home/ps/anaconda3/lib/libstdc++.so.6 /opt/MATLAB/R2022b/bin/matlab
MATLAB crashes when I run the circular(30)
command.
I also tried to make the pip install
build against
/opt/MATLAB/R2022b/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6
by uninstalling mhkit
, mhkit-python-utils
and the MHKit toolbox and repeating the whole process above after first setting
export LD_PRELOAD=/opt/MATLAB/R2022b/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6
However, this made no difference to the error message above.
I'd welcome any suggestions on how to fix the problem or what to try next, thanks.