gpt4 book ai didi

python - ImportError : matplotlib is required for plotting when the default backend "matplotlib" is selected

转载 作者:行者123 更新时间:2023-12-03 09:55:21 47 4
gpt4 key购买 nike

我是pandas_profiling的新手,在导入它时遇到ImportError。请帮忙。

import numpy as np
import pandas as pd
import pandas_profiling
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
%matplotlib inline
import seaborn as sns

在jupyter笔记本中执行以上代码后,出现以下错误。

ImportError:选择默认后端“matplotlib”时,需要使用matplotlib进行绘图。

> python --version
的Python 3.7.3

>点列表| grep -E“matplotlib | pandas”
matplotlib 3.2.0
Pandas 0.25.3
Pandas 分析2.5.3

最佳答案

我不知道真正的原因,但是我重新启动了内核,它正在工作。

在重新启动内核之前,我执行了以下命令:

conda install -c anaconda pandas-profiling

关于python - ImportError : matplotlib is required for plotting when the default backend "matplotlib" is selected,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60977789/

47 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com