{"action":"created","issue":{"url":"https://api.github.com/repos/jmschrei/pomegranate/issues/35","labels_url":"https://api.github.com/repos/jmschrei/pomegranate/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/jmschrei/pomegranate/issues/35/comments","events_url":"https://api.github.com/repos/jmschrei/pomegranate/issues/35/events","html_url":"https://github.com/jmschrei/pomegranate/issues/35","id":109230854,"number":35,"title":"'ClosureScope' object has no attribute 'scope_class'","user":{"login":"shakthimaan","id":312622,"avatar_url":"https://avatars.githubusercontent.com/u/312622?v=3","gravatar_id":"","url":"https://api.github.com/users/shakthimaan","html_url":"https://github.com/shakthimaan","followers_url":"https://api.github.com/users/shakthimaan/followers","following_url":"https://api.github.com/users/shakthimaan/following{/other_user}","gists_url":"https://api.github.com/users/shakthimaan/gists{/gist_id}","starred_url":"https://api.github.com/users/shakthimaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shakthimaan/subscriptions","organizations_url":"https://api.github.com/users/shakthimaan/orgs","repos_url":"https://api.github.com/users/shakthimaan/repos","events_url":"https://api.github.com/users/shakthimaan/events{/privacy}","received_events_url":"https://api.github.com/users/shakthimaan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-10-01T05:14:53Z","updated_at":"2015-10-14T07:40:45Z","closed_at":null,"body":"Trying to install pomegranate (c8a246be7ca847f9e509dc09efef3d3dd036ab29) using 'sudo python setup.py install' on Ubuntu 14.10 with Python 2.7.10 and Anaconda 2.3.0. Using gcc and g++ versions 4.9.1.\r\n\r\n```\r\nguest@foo ~/installs/python/pomegranate (master) $ sudo python setup.py install\r\nCompiling pomegranate/utils.pyx because it changed.\r\nCompiling pomegranate/hmm.pyx because it changed.\r\nCompiling pomegranate/FactorGraph.pyx because it changed.\r\nCompiling pomegranate/base.pyx because it changed.\r\nCompiling pomegranate/distributions.pyx because it changed.\r\nCompiling pomegranate/BayesianNetwork.pyx because it changed.\r\nCompiling pomegranate/fsm.pyx because it changed.\r\nCompiling pomegranate/gmm.pyx because it changed.\r\nCythonizing pomegranate/BayesianNetwork.pyx\r\nCythonizing pomegranate/FactorGraph.pyx\r\nCythonizing pomegranate/base.pyx\r\nCythonizing pomegranate/distributions.pyx\r\nCythonizing pomegranate/fsm.pyx\r\nwarning: pomegranate/fsm.pyx:124:37: Index should be typed for more efficient access\r\nCythonizing pomegranate/gmm.pyx\r\nCythonizing pomegranate/hmm.pyx\r\n\r\nError compiling Cython file:\r\n------------------------------------------------------------\r\n...\r\n\r\n\t\tif verbose:\r\n\t\t\tprint( \"Total Training Improvement: {}\".format( improvement ) )\r\n\t\treturn improvement\r\n\r\n\tcdef double _train_baum_welch(self, list sequences, double stop_threshold, \r\n     ^\r\n------------------------------------------------------------\r\n\r\npomegranate/hmm.pyx:2168:6: closures inside cdef functions not yet supported\r\n\r\nError compiling Cython file:\r\n------------------------------------------------------------\r\n...\r\n\t\t\t\titeration += 1\r\n\t\t\t\tlast_log_probability_sum = trained_log_probability_sum\r\n\r\n\t\t\t\tmemset( expected_transitions, 0, m*m*sizeof(double) )\r\n\t\t\t\t\r\n\t\t\t\tparallel( delayed( self._baum_welch_summarize, check_pickle=False )(\r\n                                                                      ^\r\n------------------------------------------------------------\r\n\r\npomegranate/hmm.pyx:2213:71: Compiler crash in CreateClosureClasses\r\n\r\nModuleNode.body = StatListNode(hmm.pyx:7:0)\r\nStatListNode.stats[23] = StatListNode(hmm.pyx:79:5)\r\nStatListNode.stats[0] = CClassDefNode(hmm.pyx:79:5,\r\n    as_name = u'HiddenMarkovModel',\r\n    base_class_module = u'',\r\n    base_class_name = u'Model',\r\n    class_name = u'HiddenMarkovModel',\r\n    doc = u'\\n\\tRepresents a Hidden Markov Model.\\n\\t',\r\n    module_name = u'',\r\n    visibility = u'private')\r\nCClassDefNode.body = StatListNode(hmm.pyx:80:1)\r\nStatListNode.stats[36] = CFuncDefNode(hmm.pyx:2168:6,\r\n    args = [...]/11,\r\n    doc = u'\\n\\t\\tGiven a list of sequences, perform Baum-Welch iterative re-estimation on\\n\\t\\tthe model parameters.\\n\\t\\t\\n\\t\\tIterates until the log of the \"score\" (total likelihood of all \\n\\t\\tsequences) changes by less than stop_threshold. Returns the final log\\n\\t\\tscore.\\n\\t\\t\\n\\t\\tAlways trains for at least min_iterations.\\n\\t\\t',\r\n    modifiers = [...]/0,\r\n    needs_closure = True,\r\n    visibility = u'private')\r\nCFuncDefNode.body = StatListNode(hmm.pyx:2172:2,\r\n    is_terminator = True)\r\nStatListNode.stats[5] = WithStatNode(hmm.pyx:2201:7)\r\nWithStatNode.body = TryFinallyStatNode(hmm.pyx:2201:7,\r\n    preserve_exception = 1)\r\nTryFinallyStatNode.body = TryExceptStatNode(hmm.pyx:2201:7,\r\n    has_default_clause = 1)\r\nTryExceptStatNode.body = StatListNode(hmm.pyx:2201:7)\r\nStatListNode.stats[1] = StatListNode(hmm.pyx:2202:3)\r\nStatListNode.stats[2] = WhileStatNode(hmm.pyx:2205:3)\r\nWhileStatNode.body = StatListNode(hmm.pyx:2206:4)\r\nStatListNode.stats[4] = ExprStatNode(hmm.pyx:2213:12)\r\nExprStatNode.expr = SimpleCallNode(hmm.pyx:2213:12,\r\n    analysed = True,\r\n    is_temp = 1,\r\n    use_managed_ref = True)\r\nSimpleCallNode.arg_tuple = TupleNode(hmm.pyx:2213:12,\r\n    is_sequence_constructor = 1,\r\n    is_temp = 1,\r\n    result_is_used = True,\r\n    use_managed_ref = True)\r\nTupleNode.args[0] = GeneratorExpressionNode(hmm.pyx:2213:71,\r\n    genexpr_name = u'genexpr4',\r\n    is_temp = 1,\r\n    name = u'genexpr',\r\n    needs_closure = True,\r\n    needs_self_code = True,\r\n    pymethdef_cname = u'__pyx_mdef_11pomegranate_3hmm_17HiddenMarkovModel_17_train_baum_welch_1genexpr',\r\n    result_is_used = True,\r\n    use_managed_ref = True)\r\n\r\nCompiler crash traceback from this point on:\r\n  File \"Visitor.py\", line 170, in Cython.Compiler.Visitor.TreeVisitor._visit (Cython/Compiler/Visitor.c:4287)\r\n  File \"/usr/lib/python2.7/dist-packages/Cython/Compiler/ParseTreeTransforms.py\", line 2364, in visit_LambdaNode\r\n    self.create_class_from_scope(node.def_node, self.module_scope, node)\r\n  File \"/usr/lib/python2.7/dist-packages/Cython/Compiler/ParseTreeTransforms.py\", line 2342, in create_class_from_scope\r\n    type=cscope.scope_class.type,\r\nAttributeError: 'ClosureScope' object has no attribute 'scope_class'\r\nTraceback (most recent call last):\r\n  File \"setup.py\", line 36, in <module>\r\n    extensions = cythonize( extensions )\r\n  File \"/usr/lib/python2.7/dist-packages/Cython/Build/Dependencies.py\", line 798, in cythonize\r\n    cythonize_one(*args[1:])\r\n  File \"/usr/lib/python2.7/dist-packages/Cython/Build/Dependencies.py\", line 915, in cythonize_one\r\n    raise CompileError(None, pyx_file)\r\nCython.Compiler.Errors.CompileError: pomegranate/hmm.pyx\r\n```"},"comment":{"url":"https://api.github.com/repos/jmschrei/pomegranate/issues/comments/147963866","html_url":"https://github.com/jmschrei/pomegranate/issues/35#issuecomment-147963866","issue_url":"https://api.github.com/repos/jmschrei/pomegranate/issues/35","id":147963866,"user":{"login":"shakthimaan","id":312622,"avatar_url":"https://avatars.githubusercontent.com/u/312622?v=3","gravatar_id":"","url":"https://api.github.com/users/shakthimaan","html_url":"https://github.com/shakthimaan","followers_url":"https://api.github.com/users/shakthimaan/followers","following_url":"https://api.github.com/users/shakthimaan/following{/other_user}","gists_url":"https://api.github.com/users/shakthimaan/gists{/gist_id}","starred_url":"https://api.github.com/users/shakthimaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shakthimaan/subscriptions","organizations_url":"https://api.github.com/users/shakthimaan/orgs","repos_url":"https://api.github.com/users/shakthimaan/repos","events_url":"https://api.github.com/users/shakthimaan/events{/privacy}","received_events_url":"https://api.github.com/users/shakthimaan/received_events","type":"User","site_admin":false},"created_at":"2015-10-14T07:40:45Z","updated_at":"2015-10-14T07:40:45Z","body":"Yup. After running \"conda install joblib\", running \"from pomegranate import *\" in the Python interpreter worked. Thanks!"}}