问题描述
我是pandas_profiling的新手,在导入它时遇到ImportError.请帮忙.
I am new to pandas_profiling and getting ImportError while importing it. Please help.
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笔记本中执行以上代码后,出现以下错误.
After executing the above code in jupyter notebook, I am getting the following error.
ImportError:选择默认后端"matplotlib"时,进行绘图需要使用matplotlib.
ImportError: matplotlib is required for plotting when the default backend "matplotlib" is selected.
> python --version
Python 3.7.3
> python --version
Python 3.7.3
>点列表|grep -E"matplotlib | pandas"
matplotlib 3.2.0
熊猫0.25.3
熊猫分析2.5.3
> pip list | grep -E "matplotlib|pandas"
matplotlib 3.2.0
pandas 0.25.3
pandas-profiling 2.5.3
推荐答案
我不知道实际原因,但是我重新启动了内核,并且它可以正常工作.
I don't know the actual reason but I restarted the kernel and it is working.
在重新启动内核之前,我执行了以下命令:
Before restarting the kernel I executed following commands:
这篇关于ImportError:当默认后端"matplotlib"被设置时,需要matplotlib进行绘图.被选中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!