This is an issue with the latest version of matplotlib (3.3) -- you should downgrade your matplotlib to 3.2 or you can try installing the latest yt from source, which has a fix for this problem.

On Mon, Nov 2, 2020 at 10:24 AM Siegfried Vanaverbeke <siegfriedvanaverbeke@gmail.com> wrote:
All,

I am testing a script on both windows and linux, but the latest version of yt seems to have a conflict with matplotlib:

python yt_plots.py
/home/siegfried/anaconda3/envs/science/lib/python3.8/_collections_abc.py:666: MatplotlibDeprecationWarning: The global colormaps dictionary is no longer considered public API.
  self[key]
Traceback (most recent call last):
  File "yt_plots.py", line 3, in <module>
    import yt
  File "/home/siegfried/anaconda3/envs/science/lib/python3.8/site-packages/yt/__init__.py", line 63, in <module>
    from yt.fields.api import \
  File "/home/siegfried/anaconda3/envs/science/lib/python3.8/site-packages/yt/fields/api.py", line 19, in <module>
    from . import angular_momentum
  File "/home/siegfried/anaconda3/envs/science/lib/python3.8/site-packages/yt/fields/angular_momentum.py", line 26, in <module>
    from .vector_operations import \
  File "/home/siegfried/anaconda3/envs/science/lib/python3.8/site-packages/yt/fields/vector_operations.py", line 32, in <module>
    from yt.geometry.geometry_handler import \
  File "/home/siegfried/anaconda3/envs/science/lib/python3.8/site-packages/yt/geometry/geometry_handler.py", line 29, in <module>
    from yt.utilities.parallel_tools.parallel_analysis_interface import \
  File "/home/siegfried/anaconda3/envs/science/lib/python3.8/site-packages/yt/utilities/parallel_tools/parallel_analysis_interface.py", line 30, in <module>
    from yt.data_objects.image_array import ImageArray
  File "/home/siegfried/anaconda3/envs/science/lib/python3.8/site-packages/yt/data_objects/image_array.py", line 18, in <module>
    from yt.visualization.image_writer import write_bitmap, write_image
  File "/home/siegfried/anaconda3/envs/science/lib/python3.8/site-packages/yt/visualization/image_writer.py", line 29, in <module>
    import yt.utilities.png_writer as pw
  File "/home/siegfried/anaconda3/envs/science/lib/python3.8/site-packages/yt/utilities/png_writer.py", line 13, in <module>
    import matplotlib._png as _png
ModuleNotFoundError: No module named 'matplotlib._png'

It tries to import a package that doesn't exist.  Any idea how this mistake came about ?

warmest regards,

Siegfried Vanaverbeke
_______________________________________________
yt-users mailing list -- yt-users@python.org
To unsubscribe send an email to yt-users-leave@python.org
https://mail.python.org/mailman3/lists/yt-users.python.org/
Member address: michael.zingale@stonybrook.edu


--
Michael Zingale
Associate Professor

Dept. of Physics & Astronomy • Stony Brook University • Stony Brook, NY 11794-3800
phone:  631-632-8225