Reputation: 63
I'm having problems importing pyplot into psychopy on my MacBook running OS X Yosemite. I have psychopy v1.82.01 installed.
My program contains: import matplotlib
(which works) and from matplotlib import pyplot
(which gives the following error):
ImportError: dlopen(/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/matplotlib/ft2font.so, 2): Library not loaded: /usr/X11/lib/libfreetype.6.dylib Referenced from: /Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/matplotlib/ft2font.so Reason: image not found
But I DO have pyplot.py on the Mac here: /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/pyplot.py
How do I get psychopy to import it from this other folder?
Thanks, Philip
Upvotes: 2
Views: 185
Reputation: 1223
Matlotlib (at least some parts of it I guess) depend on this font library which is distributed as part of X11 (now known as XQuartz) so try installing XQuartz from here and see if that fixes it: xquartz.macosforge.org
Upvotes: 2