You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I receive the following traceback, which was subsequently solved by performing the command pip install --force-reinstall "matplotlib==3.8.3", which downgrades matplotlib to 3.8.3.
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
File ~/Documents/composition/opuses2024/coding_projects/pde_play/.venv/lib/python3.11/site-packages/pde/fields/collection.py:21
[20](https://file+.vscode-resource.vscode-cdn.net/Users/tmroyal/Documents/composition/opuses2024/coding_projects/pde_play/~/Documents/composition/opuses2024/coding_projects/pde_play/.venv/lib/python3.11/site-packages/pde/fields/collection.py:20) try:
---> [21](https://file+.vscode-resource.vscode-cdn.net/Users/tmroyal/Documents/composition/opuses2024/coding_projects/pde_play/~/Documents/composition/opuses2024/coding_projects/pde_play/.venv/lib/python3.11/site-packages/pde/fields/collection.py:21) from matplotlib.colormaps import get_cmap
[22](https://file+.vscode-resource.vscode-cdn.net/Users/tmroyal/Documents/composition/opuses2024/coding_projects/pde_play/~/Documents/composition/opuses2024/coding_projects/pde_play/.venv/lib/python3.11/site-packages/pde/fields/collection.py:22) except ImportError:
ModuleNotFoundError: No module named 'matplotlib.colormaps'
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
Cell In[3], [line 1](vscode-notebook-cell:?execution_count=3&line=1)
----> [1](vscode-notebook-cell:?execution_count=3&line=1) import pde
[3](vscode-notebook-cell:?execution_count=3&line=3) grid = pde.UnitGrid
[4](vscode-notebook-cell:?execution_count=3&line=4) state = pde.ScalarField.random_uniform(grid)
File ~/Documents/composition/opuses2024/coding_projects/pde_play/.venv/lib/python3.11/site-packages/pde/__init__.py:28
[25](https://file+.vscode-resource.vscode-cdn.net/Users/tmroyal/Documents/composition/opuses2024/coding_projects/pde_play/~/Documents/composition/opuses2024/coding_projects/pde_play/.venv/lib/python3.11/site-packages/pde/__init__.py:25) del Config # clean name space
[27](https://file+.vscode-resource.vscode-cdn.net/Users/tmroyal/Documents/composition/opuses2024/coding_projects/pde_play/~/Documents/composition/opuses2024/coding_projects/pde_play/.venv/lib/python3.11/site-packages/pde/__init__.py:27) # import all other modules that should occupy the main name space
---> [28](https://file+.vscode-resource.vscode-cdn.net/Users/tmroyal/Documents/composition/opuses2024/coding_projects/pde_play/~/Documents/composition/opuses2024/coding_projects/pde_play/.venv/lib/python3.11/site-packages/pde/__init__.py:28) from .fields import * # @UnusedWildImport
[29](https://file+.vscode-resource.vscode-cdn.net/Users/tmroyal/Documents/composition/opuses2024/coding_projects/pde_play/~/Documents/composition/opuses2024/coding_projects/pde_play/.venv/lib/python3.11/site-packages/pde/__init__.py:29) from .grids import * # @UnusedWildImport
[30](https://file+.vscode-resource.vscode-cdn.net/Users/tmroyal/Documents/composition/opuses2024/coding_projects/pde_play/~/Documents/composition/opuses2024/coding_projects/pde_play/.venv/lib/python3.11/site-packages/pde/__init__.py:30) from .pdes import * # @UnusedWildImport
File ~/Documents/composition/opuses2024/coding_projects/pde_play/.venv/lib/python3.11/site-packages/pde/fields/__init__.py:26
[1](https://file+.vscode-resource.vscode-cdn.net/Users/tmroyal/Documents/composition/opuses2024/coding_projects/pde_play/~/Documents/composition/opuses2024/coding_projects/pde_play/.venv/lib/python3.11/site-packages/pde/fields/__init__.py:1) """
[2](https://file+.vscode-resource.vscode-cdn.net/Users/tmroyal/Documents/composition/opuses2024/coding_projects/pde_play/~/Documents/composition/opuses2024/coding_projects/pde_play/.venv/lib/python3.11/site-packages/pde/fields/__init__.py:2) Defines fields, which contain the actual data stored on a discrete grid.
[3](https://file+.vscode-resource.vscode-cdn.net/Users/tmroyal/Documents/composition/opuses2024/coding_projects/pde_play/~/Documents/composition/opuses2024/coding_projects/pde_play/.venv/lib/python3.11/site-packages/pde/fields/__init__.py:3)
(...)
[22](https://file+.vscode-resource.vscode-cdn.net/Users/tmroyal/Documents/composition/opuses2024/coding_projects/pde_play/~/Documents/composition/opuses2024/coding_projects/pde_play/.venv/lib/python3.11/site-packages/pde/fields/__init__.py:22) .. codeauthor:: David Zwicker <[email protected]>
[23](https://file+.vscode-resource.vscode-cdn.net/Users/tmroyal/Documents/composition/opuses2024/coding_projects/pde_play/~/Documents/composition/opuses2024/coding_projects/pde_play/.venv/lib/python3.11/site-packages/pde/fields/__init__.py:23) """
[25](https://file+.vscode-resource.vscode-cdn.net/Users/tmroyal/Documents/composition/opuses2024/coding_projects/pde_play/~/Documents/composition/opuses2024/coding_projects/pde_play/.venv/lib/python3.11/site-packages/pde/fields/__init__.py:25) from .base import FieldBase
---> [26](https://file+.vscode-resource.vscode-cdn.net/Users/tmroyal/Documents/composition/opuses2024/coding_projects/pde_play/~/Documents/composition/opuses2024/coding_projects/pde_play/.venv/lib/python3.11/site-packages/pde/fields/__init__.py:26) from .collection import FieldCollection
[27](https://file+.vscode-resource.vscode-cdn.net/Users/tmroyal/Documents/composition/opuses2024/coding_projects/pde_play/~/Documents/composition/opuses2024/coding_projects/pde_play/.venv/lib/python3.11/site-packages/pde/fields/__init__.py:27) from .scalar import ScalarField
[28](https://file+.vscode-resource.vscode-cdn.net/Users/tmroyal/Documents/composition/opuses2024/coding_projects/pde_play/~/Documents/composition/opuses2024/coding_projects/pde_play/.venv/lib/python3.11/site-packages/pde/fields/__init__.py:28) from .tensorial import Tensor2Field
File ~/Documents/composition/opuses2024/coding_projects/pde_play/.venv/lib/python3.11/site-packages/pde/fields/collection.py:23
[21](https://file+.vscode-resource.vscode-cdn.net/Users/tmroyal/Documents/composition/opuses2024/coding_projects/pde_play/~/Documents/composition/opuses2024/coding_projects/pde_play/.venv/lib/python3.11/site-packages/pde/fields/collection.py:21) from matplotlib.colormaps import get_cmap
[22](https://file+.vscode-resource.vscode-cdn.net/Users/tmroyal/Documents/composition/opuses2024/coding_projects/pde_play/~/Documents/composition/opuses2024/coding_projects/pde_play/.venv/lib/python3.11/site-packages/pde/fields/collection.py:22) except ImportError:
---> [23](https://file+.vscode-resource.vscode-cdn.net/Users/tmroyal/Documents/composition/opuses2024/coding_projects/pde_play/~/Documents/composition/opuses2024/coding_projects/pde_play/.venv/lib/python3.11/site-packages/pde/fields/collection.py:23) from matplotlib.cm import get_cmap
[25](https://file+.vscode-resource.vscode-cdn.net/Users/tmroyal/Documents/composition/opuses2024/coding_projects/pde_play/~/Documents/composition/opuses2024/coding_projects/pde_play/.venv/lib/python3.11/site-packages/pde/fields/collection.py:25) from ..grids.base import GridBase
[26](https://file+.vscode-resource.vscode-cdn.net/Users/tmroyal/Documents/composition/opuses2024/coding_projects/pde_play/~/Documents/composition/opuses2024/coding_projects/pde_play/.venv/lib/python3.11/site-packages/pde/fields/collection.py:26) from ..tools.docstrings import fill_in_docstring
ImportError: cannot import name 'get_cmap' from 'matplotlib.cm' (/Users/tmroyal/Documents/composition/opuses2024/coding_projects/pde_play/.venv/lib/python3.11/site-packages/matplotlib/cm.py)
The text was updated successfully, but these errors were encountered:
matplotlib broke compatibility with get_cmap in new release (3.9)
When executing the base example on a newly installed version of py-pde:
I receive the following traceback, which was subsequently solved by performing the command
pip install --force-reinstall "matplotlib==3.8.3"
, which downgrades matplotlib to 3.8.3.Other packages seem to be having the same issue (atarashansky/SAMap#148).
The text was updated successfully, but these errors were encountered: