#50065: py-matplotlib: Problem with import matplotlib.pyplot : RuntimeError: module compiled against API version a but this version of numpy is 9 ----------------------------+-------------------- Reporter: phillicl@… | Owner: sean@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: py-matplotlib | ----------------------------+-------------------- Comment (by phillicl@…): I decided that the problem may be that despite the fact that I uninstalled and reinstalled numpy, that an old version of numpy (1.9.3) was still hanging around and being imported each time numpy was used. So I uninstalled py27-numpy, cleaned that directory, and rebuilt everything. Indeed now I get which python /opt/local/bin/python import numpy
numpy.__version__ '1.10.1' numpy.__path__ ['/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/numpy']
However, now when I import matplotb.pyplot, the import just hangs..... When I kill the import, its always hanging in the same place {{{ File "<stdin>", line 1, in <module> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/matplotlib/pyplot.py", line 29, in <module> import matplotlib.colorbar File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/matplotlib/colorbar.py", line 34, in <module> import matplotlib.collections as collections File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/matplotlib/collections.py", line 27, in <module> import matplotlib.backend_bases as backend_bases File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/matplotlib/backend_bases.py", line 62, in <module> import matplotlib.textpath as textpath File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/matplotlib/textpath.py", line 15, in <module> import matplotlib.font_manager as font_manager File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/matplotlib/font_manager.py", line 1420, in <module> _rebuild() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/matplotlib/font_manager.py", line 1405, in _rebuild fontManager = FontManager() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/matplotlib/font_manager.py", line 1043, in __init__ self.ttffiles = findSystemFonts(paths) + findSystemFonts() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/matplotlib/font_manager.py", line 323, in findSystemFonts for f in get_fontconfig_fonts(fontext): File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/matplotlib/font_manager.py", line 276, in get_fontconfig_fonts output = pipe.communicate()[0] File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 799, in communicate return self._communicate(input) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1409, in _communicate stdout, stderr = self._communicate_with_poll(input) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1463, in _communicate_with_poll ready = poller.poll() }}} -- Ticket URL: <https://trac.macports.org/ticket/50065#comment:2> MacPorts <https://www.macports.org/> Ports system for OS X