Python 通过pip安装最新版本的seaborn(0.9.0)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/51422146/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 19:50:58  来源:igfitidea点击:

Install the latest version of seaborn (0.9.0) through pip

pythonseaborn

提问by AdeEla

I want to create a catplot using seaborn package and I know that in order to be able to do that I need the latest version of seaborn(0.9.0). I installed the package for conda using:

我想使用 seaborn 包创建一个猫图,我知道为了能够做到这一点,我需要最新版本的 seaborn(0.9.0)。我使用以下命令安装了 conda 软件包:

 conda install seaborn 

but it downloaded version 0.8.1.

但它下载了 0.8.1 版。

I therefore installed the version that I want using pip:

因此,我使用 pip 安装了我想要的版本:

 pip3 install seaborn==0.9.0

but I keep getting the same error whenever I run my code: AttributeError: module 'seaborn' has no attribute 'catplot'(attribute that is only available in the latest version).

但是每当我运行我的代码时,我都会遇到同样的错误: AttributeError: module 'seaborn' has no attribute 'catplot'(该属性仅在最新版本中可用)。

Can anyone please assist with this?

任何人都可以帮忙吗?

采纳答案by ImportanceOfBeingErnest

Apparently conda has not yet integrated seaborn 0.9.0 into it's default channel. You may still try to get it through conda-forge

显然 conda 尚未将 seaborn 0.9.0 集成到其默认通道中。你仍然可以尝试通过conda-forge

conda install -c conda-forge seaborn 

You can also use pip from within the conda environment in use.

您还可以在正在使用的 conda 环境中使用 pip。

> activate
(base) > python -mpip install seaborn==0.9.0

回答by Divyanshu Srivastava

I was having seaborn 0.8.0. This worked for me.

我有seaborn 0.8.0。这对我有用。

sudo -H pip install seaborn==0.9.0

回答by invictus

This worked for me:

这对我有用:

conda install -c anaconda seaborn

Credit: https://anaconda.org/anaconda/seaborn

信用:https: //anaconda.org/anaconda/seaborn

回答by Spinor8

If you are going for developmental features of seaborn, try installing direct.

如果您要使用 seaborn 的开发功能,请尝试直接安装。

pip install git+https://github.com/mwaskom/seaborn.git#egg=seaborn