{"action":"closed","issue":{"url":"https://api.github.com/repos/kivy/kivy/issues/3718","labels_url":"https://api.github.com/repos/kivy/kivy/issues/3718/labels{/name}","comments_url":"https://api.github.com/repos/kivy/kivy/issues/3718/comments","events_url":"https://api.github.com/repos/kivy/kivy/issues/3718/events","html_url":"https://github.com/kivy/kivy/issues/3718","id":112869350,"number":3718,"title":"Cannot import name 'get_hooks' when building Windows executable","user":{"login":"dagrooms52","id":8743446,"avatar_url":"https://avatars.githubusercontent.com/u/8743446?v=3","gravatar_id":"","url":"https://api.github.com/users/dagrooms52","html_url":"https://github.com/dagrooms52","followers_url":"https://api.github.com/users/dagrooms52/followers","following_url":"https://api.github.com/users/dagrooms52/following{/other_user}","gists_url":"https://api.github.com/users/dagrooms52/gists{/gist_id}","starred_url":"https://api.github.com/users/dagrooms52/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dagrooms52/subscriptions","organizations_url":"https://api.github.com/users/dagrooms52/orgs","repos_url":"https://api.github.com/users/dagrooms52/repos","events_url":"https://api.github.com/users/dagrooms52/events{/privacy}","received_events_url":"https://api.github.com/users/dagrooms52/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-22T19:03:57Z","updated_at":"2015-10-22T19:15:10Z","closed_at":"2015-10-22T19:15:10Z","body":"I've been trying to build a Windows executable of a Kivy application following these instructions: http://kivy.org/docs/guide/packaging-windows.html\r\n\r\nIt throws the error `cannot import name 'get_hooks'`. \r\n\r\nHere is my spec file:\r\n\r\n    # -*- mode: python -*-\r\n\r\n    from kivy.tools.packaging.pyinstaller_hooks import get_hooks\r\n    import os\r\n\r\n    block_cipher = None\r\n\r\n\r\n    a = Analysis(['C:\\\\Users\\\\Daniel\\\\Desktop\\\\Classes\\\\SeniorDesign\\\\TabMachine\\\\main.py'],\r\n                 pathex=['C:\\\\Daniel\\\\Kivy\\\\Kivy-1.9.0-py3.4-win32-x64\\\\TabMachine'],\r\n                 binaries=None,\r\n                 datas=None,\r\n                 hiddenimports=[],\r\n                 excludes=[],\r\n                 win_no_prefer_redirects=None,\r\n                 win_private_assemblies=None,\r\n                 cipher=block_cipher,\r\n                 **get_hooks())\r\n    pyz = PYZ(a.pure, a.zipped_data,\r\n                 cipher=block_cipher)\r\n    exe = EXE(pyz,\r\n              a.scripts,\r\n              exclude_binaries=True,\r\n              name='TabMachine',\r\n              debug=False,\r\n              strip=None,\r\n              upx=True,\r\n              console=True )\r\n    coll = COLLECT(exe,\r\n                   Tree('C:\\\\Users\\\\Daniel\\\\Desktop\\\\Classes\\\\SeniorDesign\\\\TabMachine'),\r\n                   a.binaries,\r\n                   a.zipfiles,\r\n                   a.datas,\r\n                   strip=None,\r\n                   upx=True,\r\n                   name='TabMachine')\r\n\r\n\r\nAnd here is my full error output:\r\n\r\n    C:\\Daniel\\Kivy\\Kivy-1.9.0-py3.4-win32-x64\\TabMachine>pyinstaller TabMachine.spec\r\n    71 INFO: PyInstaller: 3.1.dev0\r\n    72 INFO: Python: 3.4.3\r\n    72 INFO: Platform: Windows-8-6.2.9200\r\n    76 INFO: UPX is not available.\r\n    [INFO              ] [Logger      ] Record log in C:\\Users\\Daniel\\.kivy\\logs\\kivy_15-10-22_10.txt\r\n    101 INFO: [Logger      ] Record log in C:\\Users\\Daniel\\.kivy\\logs\\kivy_15-10-22_10.txt\r\n    [INFO              ] [Kivy        ] v1.9.0\r\n    99 INFO: [Kivy        ] v1.9.0\r\n    [INFO              ] [Python      ] v3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600     32 bit (Intel)]\r\n    102 INFO: [Python      ] v3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit     (Intel)]\r\n     Traceback (most recent call last):\r\n    105 WARNING: stderr: Traceback (most recent call last):\r\n       File \"C:\\Python34\\Scripts\\pyinstaller-script.py\", line 9, in <module>\r\n    105 WARNING: stderr:   File \"C:\\Python34\\Scripts\\pyinstaller-script.py\", line 9, in <module>\r\n         load_entry_point('PyInstaller==3.1.dev0', 'console_scripts', 'pyinstaller')()\r\n    106 WARNING: stderr:     load_entry_point('PyInstaller==3.1.dev0', 'console_scripts', 'pyinstaller')    ()\r\n       File \"C:\\Python34\\lib\\site-packages\\PyInstaller\\__main__.py\", line 97, in run\r\n    107 WARNING: stderr:   File \"C:\\Python34\\lib\\site-packages\\PyInstaller\\__main__.py\", line 97, in     run\r\n         run_build(opts, spec_file, pyi_config)\r\n    107 WARNING: stderr:     run_build(opts, spec_file, pyi_config)\r\n       File \"C:\\Python34\\lib\\site-packages\\PyInstaller\\__main__.py\", line 46, in run_build\r\n    107 WARNING: stderr:   File \"C:\\Python34\\lib\\site-packages\\PyInstaller\\__main__.py\", line 46, in     run_build\r\n         PyInstaller.building.build_main.main(pyi_config, spec_file, **opts.__dict__)\r\n    108 WARNING: stderr:     PyInstaller.building.build_main.main(pyi_config, spec_file,     **opts.__dict__)\r\n       File \"C:\\Python34\\lib\\site-packages\\PyInstaller\\building\\build_main.py\", line 738, in main\r\n    109 WARNING: stderr:   File \"C:\\Python34\\lib\\site-packages\\PyInstaller\\building\\build_main.py\",     line 738, in main\r\n         build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))\r\n    110 WARNING: stderr:     build(specfile, kw.get('distpath'), kw.get('workpath'),     kw.get('clean_build'))\r\n       File \"C:\\Python34\\lib\\site-packages\\PyInstaller\\building\\build_main.py\", line 681, in build\r\n    110 WARNING: stderr:   File \"C:\\Python34\\lib\\site-packages\\PyInstaller\\building\\build_main.py\",     line 681, in build\r\n         exec(text, spec_namespace)\r\n    111 WARNING: stderr:     exec(text, spec_namespace)\r\n       File \"<string>\", line 3, in <module>\r\n    111 WARNING: stderr:   File \"<string>\", line 3, in <module>\r\n     ImportError: cannot import name 'get_hooks'\r\n    113 WARNING: stderr: ImportError: cannot import name 'get_hooks'\r\n    \r\n    C:\\Daniel\\Kivy\\Kivy-1.9.0-py3.4-win32-x64\\TabMachine>"}}