mathworks / matlab-engine-for-python

Other
69 stars 9 forks source link

matlab engine seems to unlink a C++ library. #15

Open m-lyon opened 1 year ago

m-lyon commented 1 year ago

I've developed a python package (that's written in C++, compiled using pybind11 and has python bindings) called npy-patcher.

Problem

When I include import matlab.engine into a script, this breaks my module like so:

import matlab.engine
from npy_patcher import PatcherFloat

Error Message

ImportError: /usr/local/MATLAB/R2022b/extern/bin/glnxa64/../../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /home/anaconda3/envs/torch/lib/python3.8/site-packages/npy_patcher.cpython-38-x86_64-linux-gnu.so)

Environment

- Linux: Ubuntu 22.04.1 LTS
- python==3.8.12
- matlabengine==9.13.1
- Matlab: R2022b
m-lyon commented 1 year ago

Additionally importing matlab.engine after importing PatcherFloat does not cause an error. See this issue for more detail.