Clear Filters
Clear Filters

Error using matlab.engine with python

3 views (last 30 days)
Douglas Franz
Douglas Franz on 22 Feb 2021
Answered: kaare on 21 Nov 2023
I run into an error when trying to use the matlab.engine module in python. It seems to be a library conflict. Not sure what I can do. I think I've narrowed it down to the python package h5py. When I include it, the code breaks with this error. Without h5py, it runs fine.
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/dmf/env/STARFALL/venv/lib/python3.6/site-packages/matlab/engine/__init__.py", line 64, in <module>
'MathWorks Technical Support for assistance: %s' % e)
OSError: Please reinstall MATLAB Engine for Python or contact MathWorks Technical Support for assistance: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/me/matlab/MATLAB/R2019b/extern/engines/python/dist/matlab/engine/glnxa64/matlabengineforpython3_6.so)
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

Answers (1)

kaare
kaare on 21 Nov 2023
I have no solution to this question, but simply wanted to comment that I am here because of a similar issue. If I import matlab.engine before importing h5py in a script, I get a DLL-error for h5py.

Tags

Products


Release

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!