[MacPorts] #64662: matplotlib: fail to import due to a circular import

MacPorts noreply at macports.org
Sun Feb 13 21:50:47 UTC 2022


#64662: matplotlib: fail to import due to a circular import
----------------------------+------------------------
  Reporter:  mmaclow        |      Owner:  reneeotten
      Type:  defect         |     Status:  accepted
  Priority:  Normal         |  Milestone:
 Component:  ports          |    Version:  2.7.1
Resolution:                 |   Keywords:  monterey
      Port:  py-matplotlib  |
----------------------------+------------------------

Comment (by mmaclow):

 Thanks for checking!

 I don't think it's a jupyter issue, as I have just tried using python 3.10
 and get the same error:

 {{{
 dust-1793 25 % python
 Python 3.10.2 (main, Jan 15 2022, 11:31:35) [Clang 13.0.0
 (clang-1300.0.29.3)] on darwin
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import matplotlib
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/matplotlib/__init__.py", line 109, in <module>
     from . import _api, _version, cbook, docstring, rcsetup
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/matplotlib/cbook/__init__.py", line 31, in <module>
     from matplotlib import _api, _c_internal_utils
 ImportError: cannot import name '_c_internal_utils' from partially
 initialized module 'matplotlib' (most likely due to a circular import)
 (/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/matplotlib/__init__.py)
 >>>
 }}}

 Here's the list of installed packages requested anyway:
 {{{
 dust-1793 26 % port installed | grep -E "matplotlib|jupyter"
   py-matplotlib @3.5.1_0 (active)
   py310-jupyter @1.0.0_1 (active)
   py310-jupyter_client @7.1.2_0 (active)
   py310-jupyter_console @6.4.0_0 (active)
   py310-jupyter_core @4.7.1_0 (active)
   py310-jupyterlab_pygments @0.1.2_0 (active)
   py310-jupyterlab_widgets @1.0.2_0 (active)
   py310-matplotlib @3.5.1_0+cairo+webagg (active)
   py310-matplotlib-inline @0.1.3_0 (active)
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/64662#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list