Opened 3 years ago

Last modified 3 years ago

#64662 closed defect

matplotlib installation generating a circular import error — at Initial Version

Reported by: mmaclow (Mordecai-Mark Mac Low) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: monterey Cc: reneeotten@…
Port: py-matplotlib

Description

py310 @3.5.1_0+cairo+webagg generates circular import error on import

I have a fresh installation of MacPorts (built yesterday) on a newly upgraded version of MacOS Monterey on an x86 MacBook Pro, with the current version of Xcode. I have installed python310, py310-numpy, and so forth, including py310-matplotlib. Everything works, with no errors generated during install. However when I try to import matplotlib into a jupyter notebook, I get the error message:

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)

I have tried uninstalling and cleaning the port py310-matplotlib, and then reinstalling it, without improvement.

I don't know why it is showing up in the python3.9/site-packages rather than python3.10/site-packages, but I'm not sure whether that is the problem here.

Change History (0)

Note: See TracTickets for help on using tickets.