我正在学习 Coursera 的 ML 课程。当我不得不调用 SFrame 时出现错误。大约 2 年前有人问过同样的问题。问题是当我必须输入 sf 时,因为我收到以下消息:
import graphlab
sf = graphlab.SFrame('people-example.csv')
AttributeError Traceback (most recent call last) in ()
----> 1 sf = graphlab.SFrame('people-example.csv')
AttributeError: 'module' object has no attribute 'SFrame'
提出了一个解决方案,说明每个人都必须这样做才能解决它:
在您的 iPython/Jupyter 笔记本中,按此特定顺序执行这些步骤。
这将下载并安装依赖项。
graphlab.get_dependencies()
重启内核:内核>重启
现在导入graphlab:
import graphlab
sf = graphlab.SFrame('people-example.csv')
现在我已经完成了所有这些程序,我面临着问题。此外,现在我尝试做同样的事情,我收到一条消息:
sf = graphlab.SFrame('people-example.csv')
---------------------------------------------------------------------------
InvalidProductKey Traceback (most recent call last)
<ipython-input-2-4df0be298ea8> in <module>()
----> 1 sf = graphlab.SFrame('people-example.csv')
C:\Users\Thanos\Anaconda2\envs\gl-env\lib\site-packages\graphlab\data_structures\sframe.pyc in __init__(self, data, format, _proxy)
864 self.__proxy__ = _proxy
865 else:
--> 866 self.__proxy__ = UnitySFrameProxy(glconnect.get_client())
867 _format = None
868 if (format == 'auto'):
C:\Users\Thanos\Anaconda2\envs\gl-env\lib\site-packages\graphlab\connect\main.pyc in get_client()
137 """
138 if not is_connected():
--> 139 launch()
140 assert is_connected(), ENGINE_START_ERROR_MESSAGE
141 return __CLIENT__
C:\Users\Thanos\Anaconda2\envs\gl-env\lib\site-packages\graphlab\connect\main.pyc in launch(server_addr, server_bin, server_log, auth_token, server_public_key)
89 if server:
90 server.try_stop()
---> 91 raise e
92 server.set_log_progress(True)
93 # start the client
InvalidProductKey: Product key validation failed.
我该如何解决这个错误?谢谢