Auto py to exe ne fonctionne pas

Signaler
Messages postés
4
Date d'inscription
mercredi 2 décembre 2020
Statut
Membre
Dernière intervention
31 mai 2021
-
 Spirali -
Bonjour,
j'essaie de convertir un fichier py en exe avec auto py to exe mais le logiciel me renvoie une erreur savez vous pourquoi merci d'avance de votre réponse
Running auto-py-to-exe v2.9.0
Building directory: C:\Users\super\AppData\Local\Temp\tmp4jk4c49g
Provided command: pyinstaller --noconfirm --onefile --console "C:/Users/super/OneDrive/Bureau/test.py"
Recursion Limit is set to 5000
Executing: pyinstaller --noconfirm --onefile --console C:/Users/super/OneDrive/Bureau/test.py --distpath C:\Users\super\AppData\Local\Temp\tmp4jk4c49g\application --workpath C:\Users\super\AppData\Local\Temp\tmp4jk4c49g\build --specpath C:\Users\super\AppData\Local\Temp\tmp4jk4c49g

18699 INFO: PyInstaller: 4.2
18714 INFO: Python: 3.8.10
18735 INFO: Platform: Windows-10-10.0.19042-SP0
18745 INFO: wrote C:\Users\super\AppData\Local\Temp\tmp4jk4c49g\test.spec
18762 INFO: UPX is not available.
18783 INFO: Extending PYTHONPATH with paths
['C:\\Users\\super\\OneDrive\\Bureau',
'C:\\Users\\super\\AppData\\Local\\Temp\\tmp4jk4c49g']
18820 INFO: checking Analysis
18824 INFO: Building Analysis because Analysis-00.toc is non existent
18839 INFO: Initializing module dependency graph...
18842 INFO: Caching module graph hooks...
18862 WARNING: Several hooks defined for module 'win32ctypes.core'. Please take care they do not conflict.
18873 INFO: Analyzing base_library.zip ...
20588 INFO: Processing pre-find module path hook distutils from 'C:\\Users\\super\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python38\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-distutils.py'.
20596 INFO: distutils: retargeting to non-venv dir 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\\lib'
21596 INFO: Caching module dependency graph...
21668 INFO: running Analysis Analysis-00.toc
An error occurred while packaging
Traceback (most recent call last):
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\win32ctypes\pywin32\pywintypes.py", line 35, in pywin32error
yield
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\win32ctypes\pywin32\win32api.py", line 43, in LoadLibraryEx
return _dll._LoadLibraryEx(fileName, 0, flags)
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\win32ctypes\core\cffi\_dll.py", line 23, in _LoadLibraryEx
result = check_null(
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\win32ctypes\core\cffi\_util.py", line 81, in __call__
self._raise_error(function_name)
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\win32ctypes\core\cffi\_util.py", line 92, in _raise_error
raise exception
OSError: [WinError 1920] Le système ne peut pas accéder au fichier

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\auto_py_to_exe\packaging.py", line 131, in package
run_pyinstaller()
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\PyInstaller\__main__.py", line 114, in run
run_build(pyi_config, spec_file, **vars(args))
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\PyInstaller\__main__.py", line 65, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\PyInstaller\building\build_main.py", line 725, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\PyInstaller\building\build_main.py", line 672, in build
exec(code, spec_namespace)
File "C:\Users\super\AppData\Local\Temp\tmp4jk4c49g\test.spec", line 6, in <module>
a = Analysis(['C:/Users/super/OneDrive/Bureau/test.py'],
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\PyInstaller\building\build_main.py", line 242, in __init__
self.__postinit__()
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\PyInstaller\building\datastruct.py", line 160, in __postinit__
self.assemble()
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\PyInstaller\building\build_main.py", line 391, in assemble
self.binaries.extend(bindepend.Dependencies([('', python, '')],
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\PyInstaller\depend\bindepend.py", line 224, in Dependencies
for ftocnm, fn in getAssemblyFiles(pth, manifest, redirects):
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\PyInstaller\depend\bindepend.py", line 403, in getAssemblyFiles
for assembly in getAssemblies(pth):
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\PyInstaller\depend\bindepend.py", line 354, in getAssemblies
res = GetManifestResources(pth)
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\PyInstaller\utils\win32\winmanifest.py", line 1016, in GetManifestResources
return winresource.GetResources(filename, [RT_MANIFEST], names, languages)
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\PyInstaller\utils\win32\winresource.py", line 170, in GetResources
hsrc = win32api.LoadLibraryEx(filename, 0, LOAD_LIBRARY_AS_DATAFILE)
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\win32ctypes\pywin32\win32api.py", line 43, in LoadLibraryEx
return _dll._LoadLibraryEx(fileName, 0, flags)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Users\super\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\win32ctypes\pywin32\pywintypes.py", line 37, in pywin32error
raise error(exception.winerror, exception.function, exception.strerror)
win32ctypes.pywin32.pywintypes.error: (1920, 'LoadLibraryEx', 'Le système ne peut pas accéder au fichier')

Project output will not be moved to output folder


<config>Windows / Firefox 88.0</config
>

1 réponse

Bonsoir.

Tu nous montres le log de sortie, mais tu ne montres pas ce que tu as mis en entrée, comme ça, on dirait que tu n'as pas indiqué le chemin des fichiers python que tu importes dans ton script ou nécessaire au fonctionnement de ton application.

Sinon consulter la page indiquée pour essayer d'identifier ce qui cloche.

https://nitratine.net/blog/post/issues-when-using-auto-py-to-exe/?utm_source=auto_py_to_exe&utm_medium=application_link&utm_campaign=auto_py_to_exe_help&utm_content=bottom

N'étant pas sur système windows, je ne pourrai tester.
Sinon, y a d'autres alternatives pour créer un exe windows à partir de sources python il me semble.