So I need to run a python script from matlab. This python script loads matplotlib and this seems to be a problem. I've copied the error at the end of the email.
Details
- Platform - Linux
- When I just execute this python script from the terminal, it runs fine.
- When I execute another python script from matlab which doesn't use matplotlib, I don't seem to have a problem.
On a mac, one of my friends was able to run the script from matlab by modifying the command to
syscmd = sprintf('export DYLD_LIBRARY_PATH=""; python sim/loglike.py %s %s', 'sim/queryIn_0515-161222', 'sim/temp.txt'), system(syscmd)
Please give me any pointers on this. I couldn't find a solution via Google
best,
>> syscmd = sprintf('python sim/loglike.py %s %s', 'sim/queryIn_0515-161222', 'sim/temp.txt'), system(syscmd)
syscmd =
python sim/loglike.py sim/queryIn_0515-161222 sim/temp.txt
Traceback (most recent call last):
File "sim/loglike.py", line 6, in <module>
import matplotlib.pyplot as plt
File "/opt/python27/lib/python2.7/site-packages/matplotlib/pyplot.py", line 26, in <module>
from matplotlib.figure import Figure, figaspect
File "/opt/python27/lib/python2.7/site-packages/matplotlib/figure.py", line 34, in <module>
import matplotlib.colorbar as cbar
File "/opt/python27/lib/python2.7/site-packages/matplotlib/colorbar.py", line 29, in <module>
import matplotlib.collections as collections
File "/opt/python27/lib/python2.7/site-packages/matplotlib/collections.py", line 23, in <module>
import matplotlib.backend_bases as backend_bases
File "/opt/python27/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 37, in <module>
import matplotlib.widgets as widgets
File "/opt/python27/lib/python2.7/site-packages/matplotlib/widgets.py", line 17, in <module>
from lines import Line2D
File "/opt/python27/lib/python2.7/site-packages/matplotlib/lines.py", line 25, in <module>
from matplotlib.font_manager import FontProperties
File "/opt/python27/lib/python2.7/site-packages/matplotlib/font_manager.py", line 53, in <module>
from matplotlib import ft2font
ImportError: /opt/matlab/7.13/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /opt/python27/lib/python2.7/site-packages/matplotlib/ft2font.so)
ans =
1
printenv
via Matlab and directly via shell. Maybe you find the right one to restore the same way your friend did, otherwise add the information to your question. – Daniel May 16 at 22:47