Fails to create installer from Hello World example
See original GitHub issueI have installed eel and pyinstaller (among a lot of other things) in an Anaconda environment. I ran your Hello World example 1, and it worked. Then I tried to build a binary from it, but it failed. I’ve included the output from pip list
if needed. piplist.txt
Do these error messages mean anything to you?
(trademgr2) C:\projects\trademgr2\examples\01 - hello_world>python hello.py Hello from Python World! Hello from Javascript World!
(trademgr2) C:\projects\trademgr2\examples\01 - hello_world>python -m eel hello.py web Building executable with main script ‘hello.py’ and web folder ‘web’…
Running: pyinstaller hello.py --hidden-import bottle_websocket --add-data C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\eel\eel.js;eel --add-data web;web
292 INFO: PyInstaller: 3.4 292 INFO: Python: 3.6.3 294 INFO: Platform: Windows-10-10.0.17134-SP0 312 INFO: wrote C:\projects\trademgr2\examples\01 - hello_world\hello.spec 342 INFO: UPX is not available. 349 INFO: Extending PYTHONPATH with paths [‘C:\projects\trademgr2\examples\01 - hello_world’, ‘C:\projects\trademgr2\examples\01 - hello_world’] 356 INFO: checking Analysis 360 INFO: Building Analysis because Analysis-00.toc is non existent 360 INFO: Initializing module dependency graph… 375 INFO: Initializing module graph hooks… 377 INFO: Analyzing base_library.zip … Traceback (most recent call last): File “<string>”, line 41, in <module> File “<string>”, line 13, in walk_packages File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\pkgutil.py”, line 127, in iter_modules for name, ispkg in iter_importer_modules(i, prefix): File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\pkgutil.py”, line 146, in _iter_file_finder_modules import inspect File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\inspect.py”, line 41, in <module> import linecache File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\linecache.py”, line 11, in <module> import tokenize File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\tokenize.py”, line 33, in <module> import re File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\re.py”, line 142, in <module> class RegexFlag(enum.IntFlag): AttributeError: module ‘enum’ has no attribute ‘IntFlag’ Traceback (most recent call last): File “<string>”, line 41, in <module> File “<string>”, line 13, in walk_packages File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\pkgutil.py”, line 127, in iter_modules for name, ispkg in iter_importer_modules(i, prefix): File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\pkgutil.py”, line 146, in _iter_file_finder_modules import inspect File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\inspect.py”, line 41, in <module> import linecache File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\linecache.py”, line 11, in <module> import tokenize File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\tokenize.py”, line 33, in <module> import re File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\re.py”, line 142, in <module> class RegexFlag(enum.IntFlag): AttributeError: module ‘enum’ has no attribute ‘IntFlag’ 4158 INFO: Analyzing hidden import ‘bottle_websocket’ 4664 INFO: Processing pre-find module path hook distutils 7015 INFO: Processing pre-safe import module hook six.moves 7636 INFO: running Analysis Analysis-00.toc 7657 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable required by C:\Users\lee\Anaconda3\envs\trademgr2\python.exe 8223 INFO: Caching module hooks… 8228 INFO: Analyzing C:\projects\trademgr2\examples\01 - hello_world\hello.py 8302 INFO: Loading module hooks… 8302 INFO: Loading module hook “hook-certifi.py”… 8306 INFO: Loading module hook “hook-distutils.py”… 8316 INFO: Loading module hook “hook-encodings.py”… Traceback (most recent call last): File “<string>”, line 41, in <module> File “<string>”, line 13, in walk_packages File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\pkgutil.py”, line 127, in iter_modules for name, ispkg in iter_importer_modules(i, prefix): File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\pkgutil.py”, line 146, in iter_file_finder_modules import inspect File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\inspect.py”, line 41, in <module> import linecache File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\linecache.py”, line 11, in <module> import tokenize File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\tokenize.py”, line 33, in <module> import re File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\re.py”, line 142, in <module> class RegexFlag(enum.IntFlag): AttributeError: module ‘enum’ has no attribute ‘IntFlag’ 8478 INFO: Loading module hook “hook-gevent.py”… Traceback (most recent call last): File “<string>”, line 41, in <module> File “<string>”, line 13, in walk_packages File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\pkgutil.py”, line 127, in iter_modules for name, ispkg in iter_importer_modules(i, prefix): File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\pkgutil.py”, line 146, in iter_file_finder_modules import inspect File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\inspect.py”, line 41, in <module> import linecache File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\linecache.py”, line 11, in <module> import tokenize File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\tokenize.py”, line 33, in <module> import re File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\re.py”, line 142, in <module> class RegexFlag(enum.IntFlag): AttributeError: module ‘enum’ has no attribute ‘IntFlag’ 8651 INFO: Determining a mapping of distributions to packages… 40840 WARNING: Unable to find package for requirement greenlet from package gevent. 40840 INFO: Packages required by gevent: [‘cffi’] 41963 INFO: Processing pre-safe import module hook setuptools.extern.six.moves Traceback (most recent call last): File “<string>”, line 2, in <module> File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\setuptools_init.py", line 6, in <module> import distutils.core File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\distutils\core.py”, line 16, in <module> from distutils.dist import Distribution File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\distutils\dist.py”, line 9, in <module> import re File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\re.py”, line 142, in <module> class RegexFlag(enum.IntFlag): AttributeError: module ‘enum’ has no attribute ‘IntFlag’ Traceback (most recent call last): File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\runpy.py”, line 193, in run_module_as_main “main”, mod_spec) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\runpy.py”, line 85, in run_code exec(code, run_globals) File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\eel_main.py", line 24, in <module> pyi.run(full_args) File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller_main.py", line 111, in run run_build(pyi_config, spec_file, **vars(args)) File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller_main.py", line 63, in run_build PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\building\build_main.py”, line 838, in main build(specfile, kw.get(‘distpath’), kw.get(‘workpath’), kw.get(‘clean_build’)) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\building\build_main.py”, line 784, in build exec(text, spec_namespace) File “<string>”, line 17, in <module> File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\building\build_main.py”, line 241, in init self.postinit() File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\building\datastruct.py”, line 158, in postinit self.assemble() File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\building\build_main.py”, line 500, in assemble module_hook.post_graph() File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\building\imphook.py”, line 417, in post_graph self._process_hidden_imports() File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\building\imphook.py”, line 469, in _process_hidden_imports self.module_graph.import_hook(import_module_name, caller) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 1421, in import_hook source_package, target_module_partname, level) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 1573, in _find_head_package target_module_headname, target_package_name, source_package) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\depend\analysis.py”, line 271, in _safe_import_module module_basename, module_name, parent_package) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 1990, in _safe_import_module module_name, file_handle, pathname, metadata) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2028, in _load_module m = self._load_package(fqname, pathname, packagepath) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2813, in _load_package self._load_module(fqname, fp, buf, stuff) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2082, in _load_module self._scan_code(m, co, co_ast) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2544, in _scan_code self._process_imports(module) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2743, in _process_imports target_module = self._safe_import_hook(*import_info, **kwargs)[0] File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2221, in _safe_import_hook target_attr_names=None, level=level, edge_attr=edge_attr) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 1421, in import_hook source_package, target_module_partname, level) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 1573, in _find_head_package target_module_headname, target_package_name, source_package) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\depend\analysis.py”, line 271, in _safe_import_module module_basename, module_name, parent_package) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 1990, in _safe_import_module module_name, file_handle, pathname, metadata) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2082, in _load_module self._scan_code(m, co, co_ast) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2544, in _scan_code self._process_imports(module) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2743, in _process_imports target_module = self._safe_import_hook(*import_info, **kwargs)[0] File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2221, in _safe_import_hook target_attr_names=None, level=level, edge_attr=edge_attr) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 1421, in import_hook source_package, target_module_partname, level) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 1573, in _find_head_package target_module_headname, target_package_name, source_package) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\depend\analysis.py”, line 271, in _safe_import_module module_basename, module_name, parent_package) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 1990, in _safe_import_module module_name, file_handle, pathname, metadata) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2082, in _load_module self._scan_code(m, co, co_ast) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2544, in _scan_code self._process_imports(module) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2743, in _process_imports target_module = self._safe_import_hook(*import_info, **kwargs)[0] File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2417, in _safe_import_hook edge_attr=edge_attr) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 1438, in import_hook target_module, target_attr_names): File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 1726, in _import_importable_package_submodules attr_name, submodule_name, package) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\depend\analysis.py”, line 271, in _safe_import_module module_basename, module_name, parent_package) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 1990, in _safe_import_module module_name, file_handle, pathname, metadata) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2082, in _load_module self._scan_code(m, co, co_ast) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2544, in _scan_code self._process_imports(module) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2743, in _process_imports target_module = self._safe_import_hook(*import_info, **kwargs)[0] File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2221, in _safe_import_hook target_attr_names=None, level=level, edge_attr=edge_attr) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 1421, in import_hook source_package, target_module_partname, level) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 1573, in _find_head_package target_module_headname, target_package_name, source_package) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\depend\analysis.py”, line 271, in _safe_import_module module_basename, module_name, parent_package) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 1990, in _safe_import_module module_name, file_handle, pathname, metadata) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2028, in _load_module m = self._load_package(fqname, pathname, packagepath) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2813, in _load_package self._load_module(fqname, fp, buf, stuff) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2082, in _load_module self._scan_code(m, co, co_ast) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2544, in _scan_code self._process_imports(module) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2743, in _process_imports target_module = self._safe_import_hook(*import_info, **kwargs)[0] File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2221, in _safe_import_hook target_attr_names=None, level=level, edge_attr=edge_attr) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 1422, in import_hook target_module = self._load_tail(target_package, target_module_partname) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 1635, in _load_tail submodule = self._safe_import_module(head, mname, submodule) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\depend\analysis.py”, line 271, in _safe_import_module module_basename, module_name, parent_package) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 1990, in _safe_import_module module_name, file_handle, pathname, metadata) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2082, in _load_module self._scan_code(m, co, co_ast) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2544, in _scan_code self._process_imports(module) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2743, in _process_imports target_module = self._safe_import_hook(*import_info, **kwargs)[0] File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 2221, in _safe_import_hook target_attr_names=None, level=level, edge_attr=edge_attr) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 1422, in import_hook target_module = self._load_tail(target_package, target_module_partname) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py”, line 1635, in _load_tail submodule = self._safe_import_module(head, mname, submodule) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\depend\analysis.py”, line 260, in _safe_import_module hook_module.pre_safe_import_module(hook_api) File “C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\hooks\pre_safe_import_module\hook-setuptools.extern.six.moves.py”, line 34, in pre_safe_import_module for real_module_name, six_module_name in real_to_six_module_name.items(): AttributeError: ‘str’ object has no attribute ‘items’
(trademgr2) C:\projects\trademgr2\examples\01 - hello_world>
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
pip install --upgrade setuptools
It worked for me ^^
Hi. I’m closing this issue due to inactivity and the belief that it has been fixed in a more recent release of Eel.
If you continue to have this problem, please leave a message here or open a new issue.
Thanks.