无法在 python 中安装 seaborn 库:Spyder

Not able to install seaborn libraries in python : Spyder

我对这种 python 编程语言还很陌生。我已经在我的系统中安装了 anaconda、python 和 spyder(分别安装)。在 spyder 环境中工作时,我使用以下命令安装 seaborn 库

!pip install seaborn

我得到以下结果

\users111317\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\site-packages (0.11.1)
Requirement already satisfied: pandas>=0.23 in c:\program files\spyder\pkgs (from seaborn) (1.2.4)
Requirement already satisfied: numpy>=1.15 in c:\program files\spyder\pkgs (from seaborn) (1.19.3)
Requirement already satisfied: matplotlib>=2.2 in c:\program files\spyder\pkgs (from seaborn) (3.4.2)
Requirement already satisfied: scipy>=1.0 in c:\program files\spyder\pkgs (from seaborn) (1.6.3)
Requirement already satisfied: pyparsing>=2.2.1 in c:\program files\spyder\pkgs (from matplotlib>=2.2->seaborn) (2.4.7)
Requirement already satisfied: cycler>=0.10 in c:\program files\spyder\pkgs (from matplotlib>=2.2->seaborn) (0.10.0)
Requirement already satisfied: python-dateutil>=2.7 in c:\program files\spyder\pkgs (from matplotlib>=2.2->seaborn) (2.8.1)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\program files\spyder\pkgs (from matplotlib>=2.2->seaborn) (1.3.1)
Requirement already satisfied: pillow>=6.2.0 in c:\program files\spyder\pkgs (from matplotlib>=2.2->seaborn) (8.2.0)
Requirement already satisfied: six in c:\program files\spyder\pkgs (from cycler>=0.10->matplotlib>=2.2->seaborn) (1.16.0)
Requirement already satisfied: pytz>=2017.3 in c:\program files\spyder\pkgs (from pandas>=0.23->seaborn) (2021.1)

但是当我使用命令调用库时

import seaborn as sns

它给出以下错误

Traceback (most recent call last):

  File "<ipython-input-3-a84c0541e888>", line 1, in <module>
    import seaborn as sns

ModuleNotFoundError: No module named 'seaborn'

有人可以帮忙吗

使用cmd安装seaborn库 开始 > 运行> 命令 然后使用命令:

python -m pip install seaborn

这应该安装包,然后你可以使用python命令行来检查 导入 seaborn 您还可以使用 cmd 中的命令检查已安装的软件包:

pip list