AttributeError:'module'对象没有属性'Sframe'

时间:2016-02-16 16:07:52

标签: python graphlab sframe

我安装了Dato的GraphLab Create以便直接从其可执行文件中python 27运行,然后通过pipinstructions here)手动进行故障排除。

代码:

import graphlab
graphlab.SFrame()

输出:

[INFO] Start server at: ipc:///tmp/graphlab_server-4908 
- Server binary: C:\Users\Remi\Anaconda2\envs\dato-env\lib\site-packages\graphlab\unity_server.exe 
- Server log: C:\Users\Remi\AppData\Local\Temp\graphlab_server_1455637156.log.0
[INFO] GraphLab Server Version: 1.8.1

现在,尝试将.csv文件加载为Sframe:

csvsf = graphlab.Sframe('file.csv')

抱怨:

AttributeError Traceback (most recent call last)
<ipython-input-5-68278493c023> in <module>()
 ----> 1 sf = graphlab.Sframe('file.csv')
AttributeError: 'module' object has no attribute 'Sframe'

有任何想法如何查明问题?非常感谢。

注意:已卸载已存在的python 34版本

2 个答案:

答案 0 :(得分:0)

您只能通过graphlab.SFrame()加载graplab包(&#39; file.gl&#39;)。 而不是加载csv文件使用csvf = graphlab.SFrame.read_csv('file.csv') 有关更多信息和其他数据类型,请阅读此文档 https://dato.com/products/create/docs/graphlab.data_structures.html

答案 1 :(得分:0)

大写错误,它应该是SFrame,而不是Sframe