Hello hello,
J'ai fait un petit script en python qui fonctionne tres bien, mais quand je veux créer le .exe:
-je n'ai pas le mm message que d'ahabitude
-mon dossier dist est vide
J'ai bien installé Pyinstaller
Voila le message que j'ai:
ModuleNotFoundError: No module named 'text_unidecode'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\mikal\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\imphook.py", line 361, in _load_hook_module
self._hook_module = importlib_load_source(self.hook_module_name, self.hook_filename)
File "C:\Users\mikal\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\compat.py", line 620, in importlib_load_source
return mod_loader.load_module()
File "<frozen importlib._bootstrap_external>", line 548, in _check_name_wrapper
File "<frozen importlib._bootstrap_external>", line 1063, in load_module
File "<frozen importlib._bootstrap_external>", line 888, in load_module
File "<frozen importlib._bootstrap>", line 290, in _load_module_shim
File "<frozen importlib._bootstrap>", line 719, in _load
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "C:\Users\mikal\AppData\Local\Programs\Python\Python310\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks\hook-faker.py", line 17, in <module>
collect_data_files('text_unidecode') + # noqa: W504
File "C:\Users\mikal\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 744, in collect_data_files
pkg_base, pkg_dir = get_package_paths(package)
File "C:\Users\mikal\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 534, in get_package_paths
file_attr = get_module_file_attribute(package)
File "C:\Users\mikal\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 392, in get_module_file_attribute
raise ImportError(f"Failed to obtain the __file__ attribute of package/module {package}!") from e
ImportError: Failed to obtain the __file__ attribute of package/module text_unidecode!
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\mikal\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\mikal\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\mikal\AppData\Local\Programs\Python\Python310\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
File "C:\Users\mikal\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\__main__.py", line 178, in run
run_build(pyi_config, spec_file, **vars(args))
File "C:\Users\mikal\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\__main__.py", line 59, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "C:\Users\mikal\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\build_main.py", line 845, in main
build(specfile, distpath, workpath, clean_build)
File "C:\Users\mikal\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\build_main.py", line 767, in build
exec(code, spec_namespace)
File "C:\Users\mikal\PycharmProjects\pendu\main.spec", line 7, in <module>
a = Analysis(
File "C:\Users\mikal\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\build_main.py", line 319, in __init__
self.__postinit__()
File "C:\Users\mikal\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\datastruct.py", line 173, in __postinit__
self.assemble()
File "C:\Users\mikal\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\build_main.py", line 487, in assemble
self.graph.process_post_graph_hooks(self)
File "C:\Users\mikal\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 326, in process_post_graph_hooks
module_hook.post_graph(analysis)
File "C:\Users\mikal\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\imphook.py", line 398, in post_graph
self._load_hook_module()
File "C:\Users\mikal\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\imphook.py", line 364, in _load_hook_module
raise ImportErrorWhenRunningHook(self.hook_module_name, self.hook_filename)
PyInstaller.exceptions.ImportErrorWhenRunningHook: Failed to import module __PyInstaller_hooks_0_faker required by hook for module C:\Users\mikal\AppData\Local\Prog
rams\Python\Python310\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks\hook-faker.py. Please check whether module __PyInstaller_hooks_0_faker actually ex
ists and whether the hook is compatible with your version of C:\Users\mikal\AppData\Local\Programs\Python\Python310\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks\hook-faker.py: You might want to read more about hooks in the manual and provide a pull-request to improve PyInstaller.
Et le dossier dist
