1

我一直在尝试在Rodeo上安装 ggplot一段时间。我阅读了一些主题,例如安装 ggplot for python failed with error code 1pip install numpy (python 2.7) failed with errorcode 1Error while installed ggplot in python。他们都没有解决我的问题(这可能更简单,但我找不到答案)。

我还遵循了https://pypi.python.org/pypi/ggplot的指南。它也没有奏效。

我不断收到以下错误:

点安装 -U ggplot

SyntaxError:无效语法(< ipython-input-32-9868b8f5549e >,第 1 行)

文件“<ipython-input-32-9868b8f5549e >”,第 1 行

点安装 git+ https://github.com/yhat/ggplot.git

         ^

SyntaxError:无效的语法

还会发生的是:

将 ggplot 导入为 ggplot

ImportError:没有名为“ggplot”的模块


ImportError Traceback(最近一次调用最后一次)

<ipython-input-22-66fae3902047> in ()

----> 1 将 ggplot 导入为 ggplot

ImportError:没有名为“ggplot”的模块

我尝试使用 Spyder,但我得到的是消息“以下命令必须在 IPython shell 之外运行:”。

我错过了什么?如何在 Rodeo 上使用 ggplot?或者至少在 Spyder 上?

4

1 回答 1

0

在 rodeo 或 spyder python 中,我使用了以下代码:

import pip
pip.main(['install','ggplot'])
from ggplot import *
于 2018-06-12T05:43:18.933 回答