在 Python 中使用 Pip 安装 Seaborn
Manav Narula
2021年12月24日

本教程将介绍如何使用 pip
命令在你的设备上安装 seaborn 模块。
此命令用于安装或卸载 Python 中的不同模块。它还可以用于在 Python 中管理和创建虚拟环境。
我们可以很容易地使用 pip 命令从命令终端安装这个包。我们可以通过运行以下命令来安装 seaborn 包。
pip install seaborn
在运行此命令之前,请确保你的设备上安装了 pip。对于 Python 3,我们可以使用 pip3 命令而不是 pip。
我们还可以指定我们希望安装的模块所需的版本,如下所示。
pip3 install seaborn==0.9.0
如果我们要安装 seaborn 模块的开发版本,我们必须使用仓库的 git 链接。请参考下面的命令。
pip install git+https://github.com/mwaskom/seaborn.git#egg=seaborn
Ubuntu 用户请记住在安装软件包时在 pip 命令之前在终端上使用 sudo
命令。安装后,我们可以使用 pip show seaborn
来检查和查看已安装模块的详细信息。
作者: Manav Narula
Manav is a IT Professional who has a lot of experience as a core developer in many live projects. He is an avid learner who enjoys learning new things and sharing his findings whenever possible.
LinkedIn