Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#60089 closed defect (fixed)

fail to import matplotlib in python3.x

Reported by: lpagani91 Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc:
Port: py-matplotlib

Description (last modified by mf2k (Frank Schima))

I have updated my macport recently and matplotlib seems to be broken in the python3.x (x=6,7,8) versions :

laurent>ipython
Python 3.8.1 (default, Jan  5 2020, 21:31:21) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.12.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import matplotlib                                                                                                                                                                                                                  
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-0484cd13f94d> in <module>
----> 1 import matplotlib

/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/matplotlib/__init__.py in <module>
    203 
    204 
--> 205 _check_versions()
    206 
    207 

/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/matplotlib/__init__.py in _check_versions()
    188     # Quickfix to ensure Microsoft Visual C++ redistributable
    189     # DLLs are loaded before importing kiwisolver
--> 190     from . import ft2font
    191 
    192     for modname, minver in [

ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/matplotlib/ft2font.cpython-38-darwin.so, 2): Symbol not found: _MPL_matplotlib__contour_ARRAY_API
  Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/matplotlib/ft2font.cpython-38-darwin.so
  Expected in: flat namespace
 in /opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/matplotlib/ft2font.cpython-38-darwin.so

Change History (4)

comment:1 Changed 5 years ago by reneeotten (Renee Otten)

I hope this should have been fixed yesterday with this commit. Can you please try and do sudo port selfupdate ; sudo port upgrade outdated and try again. Let us know if that resolved the issue.

comment:2 Changed 5 years ago by lpagani91

OK, it fixed it. I tried to reinstall matplotlib before opening the ticket but without selfupdating macports. I guess that this prevented it to fetch the _1 version. Thanks a lot!

Laurent

comment:3 Changed 5 years ago by reneeotten (Renee Otten)

Port: py-matplotlib added; py3x-matplotlib removed
Resolution: fixed
Status: newclosed

comment:4 Changed 5 years ago by mf2k (Frank Schima)

Description: modified (diff)

In the future, please use WikiFormatting.

Note: See TracTickets for help on using tickets.