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
Hi, I just installed psy-view on Linux via my miniconda: conda create -n psyplot -c conda-forge --override-channels psy-view
After then typing psy-view launching fails due to an import error in psy-simple with a matplotlib method:
(psyplot) 14:30 ~/Documents/stuff $psy-view
Traceback (most recent call last):
File "/home/marcowurth/miniconda3/envs/psyplot/bin/psy-view", line 11, in
sys.exit(main())
^^^^^^
File "/home/marcowurth/miniconda3/envs/psyplot/lib/python3.11/site-packages/psy_view/init.py", line 161, in main
start_app(ds, args.name, args.plotmethod, args.preset)
File "/home/marcowurth/miniconda3/envs/psyplot/lib/python3.11/site-packages/psy_view/init.py", line 70, in start_app
from psy_view.ds_widget import DatasetWidgetStandAlone
File "/home/marcowurth/miniconda3/envs/psyplot/lib/python3.11/site-packages/psy_view/ds_widget.py", line 42, in
from psy_view.plotmethods import (
File "/home/marcowurth/miniconda3/envs/psyplot/lib/python3.11/site-packages/psy_view/plotmethods.py", line 37, in
import psy_simple.widgets.colors as pswc
File "/home/marcowurth/miniconda3/envs/psyplot/lib/python3.11/site-packages/psy_simple/widgets/colors.py", line 30, in
import psy_simple.colors as psc
File "/home/marcowurth/miniconda3/envs/psyplot/lib/python3.11/site-packages/psy_simple/colors.py", line 24, in
from matplotlib.cm import get_cmap as mpl_get_cmap
ImportError: cannot import name 'get_cmap' from 'matplotlib.cm' (/home/marcowurth/miniconda3/envs/psyplot/lib/python3.11/site-packages/matplotlib/cm.py)
I checked the module in question matplotlib/cm.py (matplotlib-base v3.9.0) and it contains the method get_cmap twice, in class ColormapRegistry and in ScalarMappable. Hope this helps.
The text was updated successfully, but these errors were encountered:
Update: matplotlib.cm.get_cmap is deprecated since v3.7. Seems straight-forward to replace your get_cmap calls with the newer matplotlib.colormaps[name], so that psy-view works with newer matplotlib versions too.
Hi, I just installed psy-view on Linux via my miniconda:
conda create -n psyplot -c conda-forge --override-channels psy-view
After then typing psy-view launching fails due to an import error in psy-simple with a matplotlib method:
I checked the module in question matplotlib/cm.py (matplotlib-base v3.9.0) and it contains the method get_cmap twice, in class ColormapRegistry and in ScalarMappable. Hope this helps.
The text was updated successfully, but these errors were encountered: