首页 文章

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

提问于
浏览
9

我想用seaborn包创建一个catplot,我知道为了能够做到这一点,我需要最新版本的seaborn(0.9.0) . 我用conda安装了包:

conda install seaborn

但它下载的版本为0.8.1 .

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

pip3 install seaborn==0.9.0

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

有人可以帮忙吗?

3 回答

  • 10

    显然,conda还没有将seaborn 0.9.0集成到它的默认 Channels 中 . 你可能仍然试图通过 conda-forge

    conda install -c conda-forge seaborn
    

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

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

    我有0.8.0的seaborn . 这对我有用 .

    sudo -H pip install seaborn==0.9.0
    
  • 2

    如果您想获得seaborn的开发功能,请尝试直接安装 .

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

相关问题