我正在华盛顿大学的Coursera 进行机器学习课程。我正在使用iPython的graphlab。在练习期间,我执行以下命令:
sales = graphlab.SFrame('home_data.gl/')
我收到错误:
InvalidProductKey Traceback (most recent call last)
<ipython-input-3-c5971b60b216> in <module>()
----> 1 sales=graphlab.SFrame('home_data.gl/')
/opt/conda/lib/python2.7/site-packages/graphlab/data_structures/sframe.pyc in __init__(self, data, format, _proxy)
865 self.__proxy__ = _proxy
866 else:
--> 867 self.__proxy__ = UnitySFrameProxy(glconnect.get_client())
868 _format = None
869 if (format == 'auto'):
/opt/conda/lib/python2.7/site-packages/graphlab/connect/main.pyc in get_client()
138 """
139 if not is_connected():
--> 140 launch()
141 assert is_connected(), ENGINE_START_ERROR_MESSAGE
142 return __CLIENT__
/opt/conda/lib/python2.7/site-packages/graphlab/connect/main.pyc in launch(server_addr, server_bin, server_log, auth_token, server_public_key)
90 if server:
91 server.try_stop()
---> 92 raise e
93 server.set_log_progress(True)
94 # start the client
InvalidProductKey: Product key not found.
(注意ipython notebook和home_data.gl在同一个文件夹中。)
答案 0 :(得分:1)
您需要使用该命令为graphlab设置产品密钥 graphlab.product_key.set_product_key('PRODUCT KEY HERE)