Windows 10上的Graphlab:导入错误:没有名为graphlab的模块

时间:2016-11-18 09:41:57

标签: python-2.7 windows-10 importerror graphlab

我正在尝试在Windows 10-64位上开始使用Graphlab

我已成功遵循此处列出的说明 https://turi.com/download/install-graphlab-create-command-line.html

然后我写了一个示例代码:

>import graphlab
>from graphlab import SFrame

>sf=graphlab.SFrame.read_csv('../Dataset_movielens-latest-small/ratings.csv', delimiter=',', header= True, column_type_hints= list[int,int,float,int])

>sf.print_rows(100,4)

之后我尝试使用我的提示在激活conda环境后运行它,但我明白了。

>[gl-env] C:PATH>Toppop_graphlab.py
>Traceback (most recent call last):
>  File "C:PATH\Toppop_graphlab.py", line 1, in <module>
>    import graphlab
>ImportError: No module named graphlab

然后我认为我的graphlab安装出错但我已尝试过这个

>[gl-env] C:PATH>python
>Python 2.7.12 |Anaconda 4.1.1 (64-bit)| (default, Jun 29 2016, 11:07:13) [MSC v.1500 64 bit (AMD64)] on win32
>Type "help", "copyright", "credits" or "license" for more information.
>Anaconda is brought to you by Continuum Analytics.
>Please check out: *links to continuum and anaconda that i can't post*
>>>> import graphlab
>>>>

你可以看到它工作正常。我想在notepad ++上编写一个python脚本并像其他任何一样运行它,我该怎么办?

感谢您的关注

1 个答案:

答案 0 :(得分:0)

安装依赖项并重新启动python。这可能有所帮助。  graphlab.get_dependencies()