{"action":"created","issue":{"url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/1346","labels_url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/1346/labels{/name}","comments_url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/1346/comments","events_url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/1346/events","html_url":"https://github.com/pyinstaller/pyinstaller/issues/1346","id":96973652,"number":1346,"title":"ImportError: No module named jnpr.junos","user":{"login":"akbhat","id":13479291,"avatar_url":"https://avatars.githubusercontent.com/u/13479291?v=3","gravatar_id":"","url":"https://api.github.com/users/akbhat","html_url":"https://github.com/akbhat","followers_url":"https://api.github.com/users/akbhat/followers","following_url":"https://api.github.com/users/akbhat/following{/other_user}","gists_url":"https://api.github.com/users/akbhat/gists{/gist_id}","starred_url":"https://api.github.com/users/akbhat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akbhat/subscriptions","organizations_url":"https://api.github.com/users/akbhat/orgs","repos_url":"https://api.github.com/users/akbhat/repos","events_url":"https://api.github.com/users/akbhat/events{/privacy}","received_events_url":"https://api.github.com/users/akbhat/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pyinstaller/pyinstaller/labels/support","name":"support","color":"009800"},{"url":"https://api.github.com/repos/pyinstaller/pyinstaller/labels/Windows","name":"Windows","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-07-24T06:15:29Z","updated_at":"2015-08-04T06:47:49Z","closed_at":null,"body":"I am running into an import error and can't figure how to get around it. I tried using a hook file named hook-jnpr.junos.py with hiddenimports = ['junpr.junos'] but that did not resolve the issue. Can somebody suggest what is wrong here? I can share any log files if needed.\r\n\r\nThe imports are as below:\r\nfrom jnpr.junos.utils.start_shell import StartShell\r\nfrom jnpr.junos.utils.fs import FS\r\nfrom jnpr.junos.utils.scp import SCP\r\n\r\nBuild Log:\r\nPS C:\\DLs\\Python\\Telnet scripts> pyinstaller.exe --onefile .\\jdata.py --additional-hooks-dir=hooks --debug\r\n23 INFO: wrote C:\\DLs\\Python\\Telnet scripts\\jdata.spec\r\n39 INFO: Testing for ability to set icons, version resources...\r\n49 INFO: ... resource update available\r\n52 INFO: UPX is not available.\r\n75 INFO: Processing hook hook-os\r\n190 INFO: Processing hook hook-time\r\n196 INFO: Processing hook hook-cPickle\r\n263 INFO: Processing hook hook-_sre\r\n383 INFO: Processing hook hook-cStringIO\r\n476 INFO: Processing hook hook-encodings\r\n490 INFO: Processing hook hook-codecs\r\n861 INFO: Processing hook hook-httplib\r\n867 INFO: Processing hook hook-email\r\n973 INFO: Processing hook hook-email.message\r\n1199 WARNING: library python%s%s required via ctypes not found\r\n1332 INFO: Extending PYTHONPATH with C:\\DLs\\Python\\Telnet scripts\r\n1334 INFO: checking Analysis\r\n1335 INFO: building Analysis because out00-Analysis.toc non existent\r\n1335 INFO: running Analysis out00-Analysis.toc\r\n1338 INFO: Adding Microsoft.VC90.CRT to dependent assemblies of final executable\r\n1421 INFO: Searching for assembly x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none ...\r\n1423 INFO: Found manifest C:\\Windows\\WinSxS\\Manifests\\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91.manifest\r\n1427 INFO: Searching for file msvcr90.dll\r\n1427 INFO: Found file C:\\Windows\\WinSxS\\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91\\msvcr90.dll\r\n1430 INFO: Searching for file msvcp90.dll\r\n1431 INFO: Found file C:\\Windows\\WinSxS\\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91\\msvcp90.dll\r\n1434 INFO: Searching for file msvcm90.dll\r\n1436 INFO: Found file C:\\Windows\\WinSxS\\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91\\msvcm90.dll\r\n1518 INFO: Analyzing C:\\python27\\lib\\site-packages\\PyInstaller\\loader\\_pyi_bootstrap.py\r\n1532 INFO: Processing hook hook-os\r\n1549 INFO: Processing hook hook-site\r\n1572 INFO: Processing hook hook-encodings\r\n1687 INFO: Processing hook hook-time\r\n1693 INFO: Processing hook hook-cPickle\r\n1763 INFO: Processing hook hook-_sre\r\n1895 INFO: Processing hook hook-cStringIO\r\n2002 INFO: Processing hook hook-codecs\r\n2381 INFO: Processing hook hook-httplib\r\n2385 INFO: Processing hook hook-email\r\n2495 INFO: Processing hook hook-email.message\r\n2729 WARNING: library python%s%s required via ctypes not found\r\n2895 INFO: Processing hook hook-pydoc\r\n2957 INFO: Analyzing C:\\python27\\lib\\site-packages\\PyInstaller\\loader\\pyi_importers.py\r\n3065 INFO: Analyzing C:\\python27\\lib\\site-packages\\PyInstaller\\loader\\pyi_archive.py\r\n3168 INFO: Analyzing C:\\python27\\lib\\site-packages\\PyInstaller\\loader\\pyi_carchive.py\r\n3270 INFO: Analyzing C:\\python27\\lib\\site-packages\\PyInstaller\\loader\\pyi_os_path.py\r\n3279 INFO: Analyzing .\\jdata.py\r\n3305 INFO: Processing hook hook-lxml.etree\r\n3443 INFO: Hidden import 'codecs' has been found otherwise\r\n3444 INFO: Hidden import 'encodings' has been found otherwise\r\n3444 INFO: Looking for run-time hooks\r\n3933 INFO: Using Python library C:\\Windows\\system32\\python27.dll\r\n3997 INFO: Warnings written to C:\\DLs\\Python\\Telnet scripts\\build\\jdata\\warnjdata.txt\r\n4003 INFO: checking PYZ\r\n4006 INFO: rebuilding out00-PYZ.toc because out00-PYZ.pyz is missing\r\n4006 INFO: building PYZ (ZlibArchive) out00-PYZ.toc\r\n4950 INFO: checking PKG\r\n4953 INFO: rebuilding out00-PKG.toc because out00-PKG.pkg is missing\r\n4953 INFO: building PKG (CArchive) out00-PKG.pkg\r\n6278 INFO: checking EXE\r\n6279 INFO: rebuilding out00-EXE.toc because jdata.exe missing\r\n6280 INFO: building EXE from out00-EXE.toc\r\n6285 INFO: Appending archive to EXE C:\\DLs\\Python\\Telnet scripts\\dist\\jdata.exe\r\n\r\n\r\nThe traceback\r\nPS C:\\DLs\\Python\\Telnet scripts> .\\dist\\jdata.exe -h\r\nLOADER: executable is C:\\DLs\\Python\\TELNET~1\\dist\\jdata.exe\r\nLOADER: homepath is C:\\DLs\\Python\\TELNET~1\\dist\r\nLOADER: _MEIPASS2 is NULL\r\nLOADER: archivename is C:\\DLs\\Python\\TELNET~1\\dist\\jdata.exe\r\nLOADER: Extracting binaries\r\nLOADER: Executing self as child\r\nLOADER: Setting up to run child\r\nLOADER: Creating child process\r\nLOADER: Waiting for child process to finish...\r\nLOADER: executable is C:\\DLs\\Python\\TELNET~1\\dist\\jdata.exe\r\nLOADER: homepath is C:\\DLs\\Python\\TELNET~1\\dist\r\nLOADER: _MEIPASS2 is C:\\Users\\akbhat\\AppData\\Local\\Temp\\_MEI90362\r\nLOADER: archivename is C:\\DLs\\Python\\TELNET~1\\dist\\jdata.exe\r\nLOADER: Already in the child - running user's code.\r\nLOADER: manifestpath: C:\\Users\\akbhat\\AppData\\Local\\Temp\\_MEI90362\\jdata.exe.manifest\r\nLOADER: Activation context created\r\nLOADER: Activation context activated\r\nLOADER: Python library: C:\\Users\\akbhat\\AppData\\Local\\Temp\\_MEI90362\\python27.dll\r\nLOADER: Manipulating evironment\r\nLOADER: PYTHONPATH=C:\\Users\\akbhat\\AppData\\Local\\Temp\\_MEI90362\r\nLOADER: PYTHONHOME=C:\\Users\\akbhat\\AppData\\Local\\Temp\\_MEI90362\r\nLOADER: Manipulating Python's sys.path\r\nLOADER: importing modules from CArchive\r\nLOADER: extracted struct\r\nLOADER: extracted pyi_os_path\r\nLOADER: extracted pyi_archive\r\nLOADER: extracted pyi_importers\r\nLOADER: Installing import hooks\r\nLOADER: out00-PYZ.pyz\r\nLOADER: Running scripts\r\nTraceback (most recent call last):\r\n  File \"<string>\", line 3, in <module>\r\n  File \"C:\\python27\\Lib\\site-packages\\PyInstaller\\loader\\pyi_importers.py\", line 270, in load_module\r\n    exec(bytecode, module.__dict__)\r\n  File \"C:\\DLs\\Python\\Telnet scripts\\build\\jdata\\out00-PYZ.pyz\\jnpr_cmds\", line 2, in <module>\r\nImportError: No module named jnpr.junos\r\nLOADER: RC: -1 from jdata\r\nLOADER: OK.\r\nLOADER: Deactivating activation context\r\nLOADER: Releasing activation context\r\nLOADER: Done\r\nLOADER: Cleaning up Python interpreter.\r\nLOADER: Back to parent\r\nLOADER: Doing cleanup\r\nLOADER: Freeing archive status for C:\\DLs\\Python\\TELNET~1\\dist\\jdata.exe\r\n"},"comment":{"url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/comments/127499419","html_url":"https://github.com/pyinstaller/pyinstaller/issues/1346#issuecomment-127499419","issue_url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/1346","id":127499419,"user":{"login":"akbhat","id":13479291,"avatar_url":"https://avatars.githubusercontent.com/u/13479291?v=3","gravatar_id":"","url":"https://api.github.com/users/akbhat","html_url":"https://github.com/akbhat","followers_url":"https://api.github.com/users/akbhat/followers","following_url":"https://api.github.com/users/akbhat/following{/other_user}","gists_url":"https://api.github.com/users/akbhat/gists{/gist_id}","starred_url":"https://api.github.com/users/akbhat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akbhat/subscriptions","organizations_url":"https://api.github.com/users/akbhat/orgs","repos_url":"https://api.github.com/users/akbhat/repos","events_url":"https://api.github.com/users/akbhat/events{/privacy}","received_events_url":"https://api.github.com/users/akbhat/received_events","type":"User","site_admin":false},"created_at":"2015-08-04T06:47:49Z","updated_at":"2015-08-04T06:47:49Z","body":"Hartmut\r\nThe same issue exists in a Linux environment as well. Any chance the issue is due to the module egg file being named junos_eznc-1.2.0-py2.7.egg-info?\r\n\r\nWere you able to figure the problem based on my code example?   "}}