6

我是 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 notebook 中执行上述代码后,出现以下错误。

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

> python --version
Python 3.7.3

> 点子列表 | grep -E "matplotlib|pandas"
matplotlib 3.2.0
pandas 0.25.3
pandas-profiling 2.5.3

4

1 回答 1

7

我不知道实际原因,但我重新启动了内核并且它正在工作。

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

conda install -c anaconda pandas-profiling

于 2020-04-01T19:32:45.410 回答