{"action":"created","issue":{"url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/3458","repository_url":"https://api.github.com/repos/pyinstaller/pyinstaller","labels_url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/3458/labels{/name}","comments_url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/3458/comments","events_url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/3458/events","html_url":"https://github.com/pyinstaller/pyinstaller/issues/3458","id":313741713,"number":3458,"title":"PyQt5 QML application requires environment variables","user":{"login":"Siecje","id":4069476,"avatar_url":"https://avatars3.githubusercontent.com/u/4069476?v=4","gravatar_id":"","url":"https://api.github.com/users/Siecje","html_url":"https://github.com/Siecje","followers_url":"https://api.github.com/users/Siecje/followers","following_url":"https://api.github.com/users/Siecje/following{/other_user}","gists_url":"https://api.github.com/users/Siecje/gists{/gist_id}","starred_url":"https://api.github.com/users/Siecje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Siecje/subscriptions","organizations_url":"https://api.github.com/users/Siecje/orgs","repos_url":"https://api.github.com/users/Siecje/repos","events_url":"https://api.github.com/users/Siecje/events{/privacy}","received_events_url":"https://api.github.com/users/Siecje/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-04-12T14:03:53Z","updated_at":"2018-04-16T16:26:21Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"With the PyQt5 fixes merged https://github.com/pyinstaller/pyinstaller/pull/3439 I decided to try creating an executable that I have been having trouble with. https://github.com/pyinstaller/pyinstaller/pull/3439#issuecomment-379064155\r\n\r\nThis is the source code https://github.com/Siecje/qml-testing/tree/PyInstaller\r\n\r\nI'm using\r\n- Windows 7 32-bit\r\n- Qt 5.10.1\r\n- PyQt5 compiled from source\r\n- Python 3.4.4\r\n- pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip\r\nWhen I run the .exe I get an error\r\n\r\n```\r\nQWindowsEGLStaticContext::create: Failed to load and resolve libEGL function\r\nFailed to load opengl32sw.dll (The specified module could not be found.)\r\nFailed to load and resolve WGL/OpenGL functions\r\nFailed to create OpenGL context for format QsurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, ...<snip>\r\nThis is most likely caused by not having the necessary graphics drivers installed.\r\n\r\nInstall a driver providing OpenGL 2.0 or higher, or, if this is not possible, make sure the ANGLE Open GL ES 2.0 emulation libraries (libEGL.dll, libLESv2.dll and d3dcompiler_*.dll) are available in the application executabl's directory or in a location listed in PATH.\r\n```\r\n\r\nTo run the application I can copy these four .dlls into the `dist\\main\\` directory.\r\n\r\n- libEGL.dll\r\n- libGLESv2.dll\r\n- d3dcompiler_47.dll\r\n- opengl32sw.dll\r\n\r\nWhen I run it I get Command Prompt window with this output.\r\n```\r\nQWindowsWGLStaticContext::create: Could not initialize EGL display: error 0x3001\r\nQWindowsWGLStaticContext::create: When using ANGLE, check if d3dcompiler_4x.dll is available.\r\n```\r\nInstead of copying those .dll files I can add the Qt bin directory to my PATH.\r\n\r\n```\r\nset PATH=%PATH%;C:\\Qt\\5.10.1\\msvc2015\\bin\r\ncall main.exe\r\nQWindowsWGLStaticContext::create: Could not initialize EGL display: error 0x3001\r\nQWindowsWGLStaticContext::create: When using ANGLE, check if d3dcompiler_4x.dll is available.\r\n```\r\n\r\nWhen I copy the `dist\\main\\` to another computer (Windows 10).\r\n\r\nI have to set two environment variables before the application will work.\r\n\r\n```\r\nset QT_QPA_PLATFORM_PLUGIN_PATH=%exeDir%\\PyQt5\\Qt\\plugins\\platforms\r\nset QML2_IMPORT_PATH=%exeDir%\\PyQt5\\Qt\\qml\r\n```\r\n\r\nThere are no error messages on the Windows 10 computer with these two environment variables set."},"comment":{"url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/comments/381664965","html_url":"https://github.com/pyinstaller/pyinstaller/issues/3458#issuecomment-381664965","issue_url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/3458","id":381664965,"user":{"login":"bjones1","id":2125584,"avatar_url":"https://avatars0.githubusercontent.com/u/2125584?v=4","gravatar_id":"","url":"https://api.github.com/users/bjones1","html_url":"https://github.com/bjones1","followers_url":"https://api.github.com/users/bjones1/followers","following_url":"https://api.github.com/users/bjones1/following{/other_user}","gists_url":"https://api.github.com/users/bjones1/gists{/gist_id}","starred_url":"https://api.github.com/users/bjones1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjones1/subscriptions","organizations_url":"https://api.github.com/users/bjones1/orgs","repos_url":"https://api.github.com/users/bjones1/repos","events_url":"https://api.github.com/users/bjones1/events{/privacy}","received_events_url":"https://api.github.com/users/bjones1/received_events","type":"User","site_admin":false},"created_at":"2018-04-16T16:26:21Z","updated_at":"2018-04-16T16:26:21Z","author_association":"MEMBER","body":"Hmm. This code should run before Qt does, so I'm confused. I'm busy now, but will do some debug when I can."}}
{"actor":{"display_login":"bjones1"}}