Why do I receive a 'GLIBCXX not found' or 'unable to resolve the name' error when using a Python module with MATLAB?
Ältere Kommentare anzeigen
When I try to use scipy (version 1.10.0) with Python 3.9 and MATLAB R2022b on Ubuntu 20.04, I get an 'unable to resolve the name' error
>> pts = py.numpy.random.default_rng().random([int32(30), int32(3)]);
>> kdtree = py.scipy.spatial.KDTree(pts)
Unable to resolve the name 'py.scipy.spatial.KDTree'.
When I try to import scipy.spatial in MATLAB, I get a different error: "../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found"
>> py.importlib.import_module('tensorflow')
>> spatial = py.importlib.import_module('scipy.spatial')
Error using _kdtree><module>
Python Error: ImportError:
<matlabroot>/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6:
version `GLIBCXX_3.4.29' not found (required by
<path to virtual environment>/lib/python3.9/site-packages/scipy/spatial/_ckdtree.cpython-39-x86_64-linux-gnu.so)
...
How can I use my module with Python Interface?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Call Python from MATLAB finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!