{"action":"created","issue":{"url":"https://api.github.com/repos/pystruct/pystruct/issues/155","labels_url":"https://api.github.com/repos/pystruct/pystruct/issues/155/labels{/name}","comments_url":"https://api.github.com/repos/pystruct/pystruct/issues/155/comments","events_url":"https://api.github.com/repos/pystruct/pystruct/issues/155/events","html_url":"https://github.com/pystruct/pystruct/issues/155","id":90705462,"number":155,"title":"Parallel issue on Windows 8.1 64bit","user":{"login":"pengsun","id":4939990,"avatar_url":"https://avatars.githubusercontent.com/u/4939990?v=3","gravatar_id":"","url":"https://api.github.com/users/pengsun","html_url":"https://github.com/pengsun","followers_url":"https://api.github.com/users/pengsun/followers","following_url":"https://api.github.com/users/pengsun/following{/other_user}","gists_url":"https://api.github.com/users/pengsun/gists{/gist_id}","starred_url":"https://api.github.com/users/pengsun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pengsun/subscriptions","organizations_url":"https://api.github.com/users/pengsun/orgs","repos_url":"https://api.github.com/users/pengsun/repos","events_url":"https://api.github.com/users/pengsun/events{/privacy}","received_events_url":"https://api.github.com/users/pengsun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-24T15:16:02Z","updated_at":"2015-07-01T21:10:36Z","closed_at":null,"body":"Hi,\r\n\r\nWhenever the `Parallel` stuff is called it appears the following error (e.g., it shows up when I run the example `plot_objective_curve.py`):\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"<string>\", line 1, in <module>\r\n  File \"C:\\Python27\\lib\\multiprocessing\\forking.py\", line 380, in main\r\n    prepare(preparation_data)\r\n  File \"C:\\Python27\\lib\\multiprocessing\\forking.py\", line 495, in prepare\r\n    '__parents_main__', file, path_name, etc\r\n  File \"C:\\Python27\\Lib\\site-packages\\pystruct\\examples\\plot_objective_curve.py\", line 42, in <module>\r\n    clf.fit(X, Y)\r\n  File \"C:\\Python27\\lib\\site-packages\\pystruct-0.2.3-py2.7-win-amd64.egg\\pystruct\\learners\\one_slack_ssvm.py\", line 448, in fit\r\n    X, Y, joint_feature_gt, constraints)\r\n  File \"C:\\Python27\\lib\\site-packages\\pystruct-0.2.3-py2.7-win-amd64.egg\\pystruct\\learners\\one_slack_ssvm.py\", line 345, in _find_new_constraint\r\n    for x, y in zip(X, Y))\r\n  File \"C:\\Python27\\lib\\site-packages\\sklearn\\externals\\joblib\\parallel.py\", line 619, in __call__\r\n    self._pool = MemmapingPool(n_jobs, **poolargs)\r\n  File \"C:\\Python27\\lib\\site-packages\\sklearn\\externals\\joblib\\pool.py\", line 583, in __init__\r\n    super(MemmapingPool, self).__init__(**poolargs)\r\n  File \"C:\\Python27\\lib\\site-packages\\sklearn\\externals\\joblib\\pool.py\", line 422, in __init__\r\n    super(PicklingPool, self).__init__(**poolargs)\r\n  File \"C:\\Python27\\lib\\multiprocessing\\pool.py\", line 159, in __init__\r\n    self._repopulate_pool()\r\n  File \"C:\\Python27\\lib\\multiprocessing\\pool.py\", line 223, in _repopulate_pool\r\n    w.start()\r\n  File \"C:\\Python27\\lib\\multiprocessing\\process.py\", line 130, in start\r\n    self._popen = Popen(self)\r\n  File \"C:\\Python27\\lib\\multiprocessing\\forking.py\", line 258, in __init__\r\n    cmd = get_command_line() + [rhandle]\r\n  File \"C:\\Python27\\lib\\multiprocessing\\forking.py\", line 358, in get_command_line\r\n    is not going to be frozen to produce a Windows executable.''')\r\nRuntimeError: \r\n            Attempt to start a new process before the current process\r\n            has finished its bootstrapping phase.\r\n\r\n            This probably means that you are on Windows and you have\r\n            forgotten to use the proper idiom in the main module:\r\n\r\n                if __name__ == '__main__':\r\n                    freeze_support()\r\n                    ...\r\n\r\n            The \"freeze_support()\" line can be omitted if the program\r\n            is not going to be frozen to produce a Windows executable.\r\n```\r\n\r\nwhere the code leading to the error message is in `one_slack_ssvm.py`:\r\n``` Python\r\n    def _find_new_constraint(self, X, Y, joint_feature_gt, constraints, check=True):\r\n        if self.n_jobs != 1:\r\n            # do inference in parallel\r\n            verbose = max(0, self.verbose - 3)\r\n            Y_hat = Parallel(n_jobs=self.n_jobs, verbose=verbose)(\r\n                delayed(loss_augmented_inference)(\r\n                    self.model, x, y, self.w, relaxed=True)\r\n                for x, y in zip(X, Y))\r\n```\r\n\r\nAny suggestion to fix this is appreciated, thanks :-)"},"comment":{"url":"https://api.github.com/repos/pystruct/pystruct/issues/comments/117825609","html_url":"https://github.com/pystruct/pystruct/issues/155#issuecomment-117825609","issue_url":"https://api.github.com/repos/pystruct/pystruct/issues/155","id":117825609,"user":{"login":"amueller","id":449558,"avatar_url":"https://avatars.githubusercontent.com/u/449558?v=3","gravatar_id":"","url":"https://api.github.com/users/amueller","html_url":"https://github.com/amueller","followers_url":"https://api.github.com/users/amueller/followers","following_url":"https://api.github.com/users/amueller/following{/other_user}","gists_url":"https://api.github.com/users/amueller/gists{/gist_id}","starred_url":"https://api.github.com/users/amueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amueller/subscriptions","organizations_url":"https://api.github.com/users/amueller/orgs","repos_url":"https://api.github.com/users/amueller/repos","events_url":"https://api.github.com/users/amueller/events{/privacy}","received_events_url":"https://api.github.com/users/amueller/received_events","type":"User","site_admin":false},"created_at":"2015-07-01T21:10:36Z","updated_at":"2015-07-01T21:10:36Z","body":"yeah, that should be fine... How did you get cvxopt then?\r\nI usually use anaconda, and you could try that and see if it works."}}