【问题标题】:How to import Seaborn on EC2 t2.micro instance?如何在 EC2 t2.micro 实例上导入 Seaborn?
【发布时间】:2017-03-30 17:51:23
【问题描述】:

我正在尝试在 EC2 AWS ipython 笔记本上将 seaborn 作为 sns 导入。

但我收到以下错误。请帮忙

import seaborn as sns

ImportError Traceback(最近一次调用最后一次) 在 () ----> 1 导入 seaborn 作为 sns

ImportError: 没有名为 seaborn 的模块

【问题讨论】:

    标签: seaborn


    【解决方案1】:

    您可能首先要下载 seaborn 软件包。默认情况下,它在 python 安装时不可用。

    使用pip下载:

    pip install seaborn
    

    另外,您可以尝试安装anaconda

    $ curl -O https://repo.continuum.io/archive/Anaconda3-4.3.1-Linux-x86_64.sh
    $ chmod 777 Anaconda3-4.3.1-Linux-x86_64.sh
    $ ./Anaconda3-4.3.1-Linux-x86_64.sh
    ... (Press enter/yes where ever required )
    $ conda install seaborn
    

    【讨论】:

    • 我尝试使用 pip 安装,但它加载了所有必需的依赖包,然后结果是编译终止。
    • 能否显示运行命令的结果和遇到的错误?
    • 如果上述答案有帮助,那么您可以接受答案。它有助于其他人知道答案是否有用。
    猜你喜欢
    • 2014-12-29
    • 2020-08-08
    • 2015-09-13
    • 2018-01-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-19
    • 2016-12-26
    相关资源
    最近更新 更多