Reputation: 4037
I get this error on typing this in python command prompt: import matplotlib.pyplot as plt
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
import matplotlib.pyplot as plt
File "/Library/Python/2.7/site-packages/matplotlib-1.3.x-py2.7-macosx-10.8-intel.egg/matplotlib/pyplot.py", line 97, in <module>
_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
File "/Library/Python/2.7/site-packages/matplotlib-1.3.x-py2.7-macosx-10.8-intel.egg/matplotlib/backends/__init__.py", line 25, in pylab_setup
globals(),locals(),[backend_name])
File "/Library/Python/2.7/site-packages/matplotlib-1.3.x-py2.7-macosx-10.8-intel.egg/matplotlib/backends/backend_macosx.py", line 21, in <module>
from matplotlib.backends import _macosx
ImportError: dlopen(/Library/Python/2.7/site-packages/matplotlib-1.3.x-py2.7-macosx-10.8-intel.egg/matplotlib/backends/_macosx.so, 2): Library not loaded: /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText
Referenced from: /Library/Python/2.7/site-packages/matplotlib-1.3.x-py2.7-macosx-10.8-intel.egg/matplotlib/backends/_macosx.so
Reason: image not found
Can someone suggest me, how i can fix this ? I had installed all the packages with this shell script
https://github.com/fonnesbeck/ScipySuperpack
Is there anything that i am missing ? Any additional configuration ?
Upvotes: 3
Views: 2846
Reputation: 2804
I am seconding andershqst for OSX 10.7.4:
Go to this directory:
cd /System/Library/Frameworks
Verify that this path exists:
ls /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/Versions/A/CoreText
Create this soft link:
sudo ln -s /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework Coretext.framework
Then test your fix, as described in this tutorial.
Upvotes: 2
Reputation: 1464
I had the same problem using ScipySuperpack and solved it the following way.
Open terminal and locate the path to CoreText.framework file
sudo find / -name "CoreText.framework"
Create a symbolic link from the CoreText file at the located path, to the path in the ImportError
sudo ln -s path_located path_where_it_is_missing
At this point I got another build error because I run OSX 10.7.5 (10.8 being the one you'll currently get from the ScipySuperpack page) In that case, get the ScipySuperpack from here and answer 'yes' when prompted 'Are you installing from a repository cloned to this machine (if unsure, answer no)? (y/n)'
Upvotes: 0