holoviz / holoviews

With Holoviews, your data visualizes itself.
https://holoviews.org
BSD 3-Clause "New" or "Revised" License
2.71k stars 403 forks source link

Holoviews matplotlib extension could not be imported, #5287

Open Mickychen00 opened 2 years ago

Mickychen00 commented 2 years ago

Hi, my matplotlib version is 3.4.3 when I used hv.extension('matplotlib'), the spyder console raise warning:

param.notebook_extension: Holoviews matplotlib extension could not be imported, it raised the following exception:
ValueError(''Blues' is not a valid value for name; supported values are '538', 'accent', 'acton', 'afmhot', 'algae', 'amp', 'autumn', 'balance', 'bam', 'bamako', 'bamo', 'batlow', 'batlowk', 'batloww', 'berlin', 'bilbao', 'binary', 'blues', 'blues1', 'blues2', 'blues3', 'blues4', 'blues5', 'blues6', 'blues7', 'blues8', 'blues9', 'bmh', 'bone', 'boreal', 'br', 'brbg', 'brg', 'broc', 'broco', 'browns1', 'browns2', 'browns3', 'browns4', 'browns5', 'browns6', 'browns7', 'browns8', 'browns9', 'buda', 'bugn', 'bukavu', 'bupu', 'bwr', 'cet_bgy', 'cet_bgy_r', 'cet_bgyw', 'cet_bgyw_r', 'cet_bjy', 'cet_bjy_r', 'cet_bkr', 'cet_bkr_r', 'cet_bky', 'cet_bky_r', 'cet_blues', 'cet_blues_r', 'cet_bmw', 'cet_bmw_r', 'cet_bmy', 'cet_bmy_r', 'cet_bwy', 'cet_bwy_r', 'cet_cet_c1', 'cet_cet_c10', 'cet_cet_c10_r', 'cet_cet_c10s', 'cet_cet_c10s_r', 'cet_cet_c11', 'cet_cet_c11_r', 'cet_cet_c11s', 'cet_cet_c11s_r', 'cet_cet_c1_r', 'cet_cet_c1s', 'cet_cet_c1s_r', 'cet_cet_c2', 'cet_cet_c2_r', 'cet_cet_c2s', 'cet_cet_c2s_r', 'cet_cet_c3', 'cet_cet_c3_r', 'cet_cet_c3s', 'cet_cet_c3s_r', 'cet_cet_c4', 'cet_cet_c4_r', 'cet_cet_c4s', 'cet_cet_c4s_r', 'cet_cet_c5', 'cet_cet_c5_r', 'cet_cet_c5s', 'cet_cet_c5s_r', 'cet_cet_c6', 'cet_cet_c6_r', 'cet_cet_c6s', 'cet_cet_c6s_r', 'cet_cet_c7', 'cet_cet_c7_r', 'cet_cet_c7s', 'cet_cet_c7s_r', 'cet_cet_c8', 'cet_cet_c8_r', 'cet_cet_c8s', 'cet_cet_c8s_r', 'cet_cet_c9', 'cet_cet_c9_r', 'cet_cet_c9s', 'cet_cet_c9s_r', 'cet_cet_cbc1', 'cet_cet_cbc1_r', 'cet_cet_cbc2', 'cet_cet_cbc2_r', 'cet_cet_cbd1', 'cet_cet_cbd1_r', 'cet_cet_cbd2', 'cet_cet_cbd2_r', 'cet_cet_cbl1', 'cet_cet_cbl1_r', 'cet_cet_cbl2', 'cet_cet_cbl2_r', 'cet_cet_cbl3', 'cet_cet_cbl3_r', 'cet_cet_cbl4', 'cet_cet_cbl4_r', 'cet_cet_cbtc1', 'cet_cet_cbtc1_r', 'cet_cet_cbtc2', 'cet_cet_cbtc2_r', 'cet_cet_cbtd1', 'cet_cet_cbtd1_r', 'cet_cet_cbtl1', 'cet_cet_cbtl1_r', 'cet_cet_cbtl2', 'cet_cet_cbtl2_r', 'cet_cet_cbtl3', 'cet_cet_cbtl3_r', 'cet_cet_cbtl4', 'cet_cet_cbtl4_r', 'cet_cet_d1', 'cet_cet_d10', 'cet_cet_d10_r', 'cet_cet_d11', 'cet_cet_d11_r', 'cet_cet_d12', 'cet_cet_d12_r', 'cet_cet_d13', 'cet_cet_d13_r', 'cet_cet_d1_r', 'cet_cet_d1a', 'cet_cet_d1a_r', 'cet_cet_d2', 'cet_cet_d2_r', 'cet_cet_d3', 'cet_cet_d3_r', 'cet_cet_d4', 'cet_cet_d4_r', 'cet_cet_d6', 'cet_cet_d6_r', 'cet_cet_d7', 'cet_cet_d7_r', 'cet_cet_d8', 'cet_cet_d8_r', 'cet_cet_d9', 'cet_cet_d9_r', 'cet_cet_i1', 'cet_cet_i1_r', 'cet_cet_i2', 'cet_cet_i2_r', 'cet_cet_i3', 'cet_cet_i3_r', 'cet_cet_l1', 'cet_cet_l10', 'cet_cet_l10_r', 'cet_cet_l11', 'cet_cet_l11_r', 'cet_cet_l12', 'cet_cet_l12_r', 'cet_cet_l13', 'cet_cet_l13_r', 'cet_cet_l14', 'cet_cet_l14_r', 'cet_cet_l15', 'cet_cet_l15_r', 'cet_cet_l16', 'cet_cet_l16_r', 'cet_cet_l17', 'cet_cet_l17_r', 'cet_cet_l18', 'cet_cet_l18_r', 'cet_cet_l19', 'cet_cet_l19_r', 'cet_cet_l1_r', 'cet_cet_l2', 'cet_cet_l20', 'cet_cet_l20_r', 'cet_cet_l2_r', 'cet_cet_l3', 'cet_cet_l3_r', 'cet_cet_l4', 'cet_cet_l4_r', 'cet_cet_l5', 'cet_cet_l5_r', 'cet_cet_l6', 'cet_cet_l6_r', 'cet_cet_l7', 'cet_cet_l7_r', 'cet_cet_l8', 'cet_cet_l8_r', 'cet_cet_l9', 'cet_cet_l9_r', 'cet_cet_r1', 'cet_cet_r1_r', 'cet_cet_r2', 'cet_cet_r2_r', 'cet_cet_r3', 'cet_cet_r3_r', 'cet_cet_r4', 'cet_cet_r4_r', 'cet_circle_mgbm_67_c31', 'cet_circle_mgbm_67_c31_r', 'cet_circle_mgbm_67_c31_s25', 'cet_circle_mgbm_67_c31_s25_r', 'cet_colorwheel', 'cet_colorwheel_r', 'cet_coolwarm', 'cet_coolwarm_r', 'cet_cwr', 'cet_cwr_r', 'cet_cyclic_bgrmb_35_70_c75', 'cet_cyclic_bgrmb_35_70_c75_r', 'cet_cyclic_bgrmb_35_70_c75_s25', 'cet_cyclic_bgrmb_35_70_c75_s25_r', 'cet_cyclic_grey_15_85_c0', 'cet_cyclic_grey_15_85_c0_r', 'cet_cyclic_grey_15_85_c0_s25', 'cet_cyclic_grey_15_85_c0_s25_r', 'cet_cyclic_isoluminant', 'cet_cyclic_isoluminant_r', 'cet_cyclic_mrybm_35_75_c68', 'cet_cyclic_mrybm_35_75_c68_r', 'cet_cyclic_mrybm_35_75_c68_s25', 'cet_cyclic_mrybm_35_75_c68_s25_r', 'cet_cyclic_mybm_20_100_c48', 'cet_cyclic_mybm_20_100_c48_r', 'cet_cyclic_mybm_20_100_c48_s25', 'cet_cyclic_mybm_20_100_c48_s25_r', 'cet_cyclic_mygbm_30_95_c78', 'cet_cyclic_mygbm_30_95_c78_r', 'cet_cyclic_mygbm_30_95_c78_s25', 'cet_cyclic_mygbm_30_95_c78_s25_r', 'cet_cyclic_mygbm_50_90_c46', 'cet_cyclic_mygbm_50_90_c46_r', 'cet_cyclic_mygbm_50_90_c46_s25', 'cet_cyclic_mygbm_50_90_c46_s25_r', 'cet_cyclic_protanopic_deuteranopic_bwyk_16_96_c31', 'cet_cyclic_protanopic_deuteranopic_bwyk_16_96_c31_r', 'cet_cyclic_protanopic_deuteranopic_wywb_55_96_c33', 'cet_cyclic_protanopic_deuteranopic_wywb_55_96_c33_r', 'cet_cyclic_rygcbmr_50_90_c64', 'cet_cyclic_rygcbmr_50_90_c64_r', 'cet_cyclic_rygcbmr_50_90_c64_s25', 'cet_cyclic_rygcbmr_50_90_c64_s25_r', 'cet_cyclic_tritanopic_cwrk_40_100_c20', 'cet_cyclic_tritanopic_cwrk_40_100_c20_r', 'cet_cyclic_tritanopic_wrwc_70_100_c20', 'cet_cyclic_tritanopic_wrwc_70_100_c20_r', 'cet_cyclic_wrkbw_10_90_c43', 'cet_cyclic_wrkbw_10_90_c43_r', 'cet_cyclic_wrkbw_10_90_c43_s25', 'cet_cyclic_wrkbw_10_90_c43_s25_r', 'cet_cyclic_wrwbw_40_90_c42', 'cet_cyclic_wrwbw_40_90_c42_r', 'cet_cyclic_wrwbw_40_90_c42_s25', 'cet_cyclic_wrwbw_40_90_c42_s25_r', 'cet_cyclic_ymcgy_60_90_c67', 'cet_cyclic_ymcgy_60_90_c67_r', 'cet_cyclic_ymcgy_60_90_c67_s25', 'cet_cyclic_ymcgy_60_90_c67_s25_r', 'cet_dimgray', 'cet_dimgray_r', 'cet_diverging_bkr_55_10_c35', 'cet_diverging_bkr_55_10_c35_r', 'cet_diverging_bky_60_10_c30', 'cet_diverging_bky_60_10_c30_r', 'cet_diverging_bwg_20_95_c41', 'cet_diverging_bwg_20_95_c41_r', 'cet_diverging_bwr_20_95_c54', 'cet_diverging_bwr_20_95_c54_r', 'cet_diverging_bwr_40_95_c42', 'cet_diverging_bwr_40_95_c42_r', 'cet_diverging_bwr_55_98_c37', 'cet_diverging_bwr_55_98_c37_r', 'cet_diverging_cwm_80_100_c22', 'cet_diverging_cwm_80_100_c22_r', 'cet_diverging_gkr_60_10_c40', 'cet_diverging_gkr_60_10_c40_r', 'cet_diverging_gwr_55_95_c38', 'cet_diverging_gwr_55_95_c38_r', 'cet_diverging_gwv_55_95_c39', 'cet_diverging_gwv_55_95_c39_r', 'cet_diverging_isoluminant_cjm_75_c23', 'cet_diverging_isoluminant_cjm_75_c23_r', 'cet_diverging_isoluminant_cjm_75_c24', 'cet_diverging_isoluminant_cjm_75_c24_r', 'cet_diverging_isoluminant_cjo_70_c25', 'cet_diverging_isoluminant_cjo_70_c25_r', 'cet_diverging_linear_bjr_30_55_c53', 'cet_diverging_linear_bjr_30_55_c53_r', 'cet_diverging_linear_bjy_30_90_c45', 'cet_diverging_linear_bjy_30_90_c45_r', 'cet_diverging_linear_protanopic_deuteranopic_bjy_57_89_c34', 'cet_diverging_linear_protanopic_deuteranopic_bjy_57_89_c34_r', 'cet_diverging_protanopic_deuteranopic_bwy_60_95_c32', 'cet_diverging_protanopic_deuteranopic_bwy_60_95_c32_r', 'cet_diverging_rainbow_bgymr_45_85_c67', 'cet_diverging_rainbow_bgymr_45_85_c67_r', 'cet_diverging_tritanopic_cwr_75_98_c20', 'cet_diverging_tritanopic_cwr_75_98_c20_r', 'cet_fire', 'cet_fire_r', 'cet_glasbey', 'cet_glasbey_bw', 'cet_glasbey_bw_minc_20', 'cet_glasbey_bw_minc_20_hue_150_280', 'cet_glasbey_bw_minc_20_hue_150_280_r', 'cet_glasbey_bw_minc_20_hue_330_100', 'cet_glasbey_bw_minc_20_hue_330_100_r', 'cet_glasbey_bw_minc_20_maxl_70', 'cet_glasbey_bw_minc_20_maxl_70_r', 'cet_glasbey_bw_minc_20_minl_30', 'cet_glasbey_bw_minc_20_minl_30_r', 'cet_glasbey_bw_minc_20_r', 'cet_glasbey_bw_r', 'cet_glasbey_category10', 'cet_glasbey_category10_r', 'cet_glasbey_cool', 'cet_glasbey_cool_r', 'cet_glasbey_dark', 'cet_glasbey_dark_r', 'cet_glasbey_hv', 'cet_glasbey_hv_r', 'cet_glasbey_light', 'cet_glasbey_light_r', 'cet_glasbey_r', 'cet_glasbey_warm', 'cet_glasbey_warm_r', 'cet_gouldian', 'cet_gouldian_r', 'cet_gray', 'cet_gray_r', 'cet_gwv', 'cet_gwv_r', 'cet_isolum', 'cet_isolum_r', 'cet_isoluminant_cgo_70_c39', 'cet_isoluminant_cgo_70_c39_r', 'cet_isoluminant_cgo_80_c38', 'cet_isoluminant_cgo_80_c38_r', 'cet_isoluminant_cm_70_c39', 'cet_isoluminant_cm_70_c39_r', 'cet_kb', 'cet_kb_r', 'cet_kbc', 'cet_kbc_r', 'cet_kbgyw', 'cet_kbgyw_r', 'cet_kg', 'cet_kg_r', 'cet_kgy', 'cet_kgy_r', 'cet_kr', 'cet_kr_r', 'cet_linear_bgy_10_95_c74', 'cet_linear_bgy_10_95_c74_r', 'cet_linear_bgyw_15_100_c67', 'cet_linear_bgyw_15_100_c67_r', 'cet_linear_bgyw_15_100_c68', 'cet_linear_bgyw_15_100_c68_r', 'cet_linear_bgyw_20_98_c66', 'cet_linear_bgyw_20_98_c66_r', 'cet_linear_blue_5_95_c73', 'cet_linear_blue_5_95_c73_r', 'cet_linear_blue_95_50_c20', 'cet_linear_blue_95_50_c20_r', 'cet_linear_bmw_5_95_c86', 'cet_linear_bmw_5_95_c86_r', 'cet_linear_bmw_5_95_c89', 'cet_linear_bmw_5_95_c89_r', 'cet_linear_bmy_10_95_c71', 'cet_linear_bmy_10_95_c71_r', 'cet_linear_bmy_10_95_c78', 'cet_linear_bmy_10_95_c78_r', 'cet_linear_gow_60_85_c27', 'cet_linear_gow_60_85_c27_r', 'cet_linear_gow_65_90_c35', 'cet_linear_gow_65_90_c35_r', 'cet_linear_green_5_95_c69', 'cet_linear_green_5_95_c69_r', 'cet_linear_grey_0_100_c0', 'cet_linear_grey_0_100_c0_r', 'cet_linear_grey_10_95_c0', 'cet_linear_grey_10_95_c0_r', 'cet_linear_kbc_5_95_c73', 'cet_linear_kbc_5_95_c73_r', 'cet_linear_kbgoy_20_95_c57', 'cet_linear_kbgoy_20_95_c57_r', 'cet_linear_kbgyw_10_98_c63', 'cet_linear_kbgyw_10_98_c63_r', 'cet_linear_kbgyw_5_98_c62', 'cet_linear_kbgyw_5_98_c62_r', 'cet_linear_kgy_5_95_c69', 'cet_linear_kgy_5_95_c69_r', 'cet_linear_kry_0_97_c73', 'cet_linear_kry_0_97_c73_r', 'cet_linear_kry_5_95_c72', 'cet_linear_kry_5_95_c72_r', 'cet_linear_kry_5_98_c75', 'cet_linear_kry_5_98_c75_r', 'cet_linear_kryw_0_100_c71', 'cet_linear_kryw_0_100_c71_r', 'cet_linear_kryw_5_100_c64', 'cet_linear_kryw_5_100_c64_r', 'cet_linear_kryw_5_100_c67', 'cet_linear_kryw_5_100_c67_r', 'cet_linear_protanopic_deuteranopic_kbjyw_5_95_c25', 'cet_linear_protanopic_deuteranopic_kbjyw_5_95_c25_r', 'cet_linear_protanopic_deuteranopic_kbw_5_95_c34', 'cet_linear_protanopic_deuteranopic_kbw_5_95_c34_r', 'cet_linear_protanopic_deuteranopic_kbw_5_98_c40', 'cet_linear_protanopic_deuteranopic_kbw_5_98_c40_r', 'cet_linear_protanopic_deuteranopic_kyw_5_95_c49', 'cet_linear_protanopic_deuteranopic_kyw_5_95_c49_r', 'cet_linear_ternary_blue_0_44_c57', 'cet_linear_ternary_blue_0_44_c57_r', 'cet_linear_ternary_green_0_46_c42', 'cet_linear_ternary_green_0_46_c42_r', 'cet_linear_ternary_red_0_50_c52', 'cet_linear_ternary_red_0_50_c52_r', 'cet_linear_tritanopic_kcw_5_95_c22', 'cet_linear_tritanopic_kcw_5_95_c22_r', 'cet_linear_tritanopic_krjcw_5_95_c24', 'cet_linear_tritanopic_krjcw_5_95_c24_r', 'cet_linear_tritanopic_krjcw_5_98_c46', 'cet_linear_tritanopic_krjcw_5_98_c46_r', 'cet_linear_tritanopic_krw_5_95_c46', 'cet_linear_tritanopic_krw_5_95_c46_r', 'cet_linear_wcmr_100_45_c42', 'cet_linear_wcmr_100_45_c42_r', 'cet_linear_worb_100_25_c53', 'cet_linear_worb_100_25_c53_r', 'cet_linear_wyor_100_45_c55', 'cet_linear_wyor_100_45_c55_r', 'cet_rainbow', 'cet_rainbow4', 'cet_rainbow4_r', 'cet_rainbow_bgyr_10_90_c83', 'cet_rainbow_bgyr_10_90_c83_r', 'cet_rainbow_bgyr_35_85_c72', 'cet_rainbow_bgyr_35_85_c72_r', 'cet_rainbow_bgyr_35_85_c73', 'cet_rainbow_bgyr_35_85_c73_r', 'cet_rainbow_bgyrm_35_85_c69', 'cet_rainbow_bgyrm_35_85_c69_r', 'cet_rainbow_bgyrm_35_85_c71', 'cet_rainbow_bgyrm_35_85_c71_r', 'cet_rainbow_r', 'cividis', 'classic', 'cmrmap', 'coldhot', 'colorblind', 'colorblind10', 'cool', 'coolwarm', 'copper', 'cork', 'corko', 'crest', 'crest_r', 'cubehelix', 'curl', 'dark2', 'davos', 'deep', 'default', 'delta', 'dense', 'devon', 'div', 'drywet', 'dusk', 'fes', 'fire', 'flag', 'flare', 'flare_r', 'flatui', 'ggplot', 'gist_earth', 'gist_gray', 'gist_heat', 'gist_ncar', 'gist_rainbow', 'gist_stern', 'gist_yarg', 'glacial', 'gnbu', 'gnuplot', 'gnuplot2', 'gray', 'greens', 'greens1', 'greens2', 'greens3', 'greens4', 'greens5', 'greens6', 'greens7', 'greens8', 'greys', 'haline', 'hawaii', 'hot', 'hsv', 'ice', 'icefire', 'icefire_r', 'imola', 'inferno', 'jet', 'lajolla', 'lapaz', 'lisbon', 'magma', 'mako', 'mako_r', 'marine', 'matter', 'mono', 'monocycle', 'negpos', 'nipy_spectral', 'nuuk', 'ocean', 'oleron', 'oranges', 'oranges1', 'oranges2', 'oranges3', 'oranges4', 'orrd', 'oslo', 'oxy', 'paired', 'pastel1', 'pastel2', 'phase', 'pink', 'piyg', 'plasma', 'prgn', 'prism', 'pubu', 'pubugn', 'puor', 'purd', 'purples', 'purples1', 'purples2', 'purples3', 'qual1', 'qual2', 'rainbow', 'rdbu', 'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'reds', 'reds1', 'reds2', 'reds3', 'reds4', 'reds5', 'rocket', 'rocket_r', 'roma', 'romao', 'seaborn', 'seismic', 'set1', 'set2', 'set3', 'solar', 'spectral', 'speed', 'spring', 'stellar', 'summer', 'sunrise', 'sunset', 'tab10', 'tab20', 'tab20b', 'tab20c', 'tableau', 'tempo', 'terrain', 'thermal', 'tofino', 'tokyo', 'turbid', 'turbo', 'turku', 'twilight', 'vanimo', 'vik', 'viko', 'viridis', 'vlag', 'vlag_r', 'winter', 'wistia', 'yellows1', 'yellows2', 'yellows3', 'yellows4', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'')
<IPython.core.display.HTML object>

So what is wrong ?

jbednar commented 2 years ago

That's odd; seems like a capitalization-sensitive string comparison issue. What platform are you running, and what version of holoviews? It's hard to imagine how this wouldn't have come up for another user before.

Also, can you please try a minimal example outside of Spyder, e.g. a file with simply import holoviews as hv ; hv.extension('matplotlib')?

Mickychen00 commented 2 years ago

That's odd; seems like a capitalization-sensitive string comparison issue. What platform are you running, and what version of holoviews? It's hard to imagine how this wouldn't have come up for another user before.

Also, can you please try a minimal example outside of Spyder, e.g. a file with simply import holoviews as hv ; hv.extension('matplotlib')?

My hv.version: '1.14.8' I found after I use this render method. This issue appears. For first use these three functions, hv.extension('matplotlib') is ok and the image shown in spyder console. But for second use, backend as matplotlib raise the above issue. But backend and hv.extension as bokeh, the html image render is no-problem. When I use cmd's ipython, they are same.

jbednar commented 2 years ago

Sorry; I can't follow the description above. Can you provide a reproducible list of steps to recreate the issue?