Python Forum
compiling python using pyinstaller
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
compiling python using pyinstaller
#1
hi. I have written a code to create a GUI to print barcodes. but when I try compiling it on the command prompt using pyinstaller I get this error. please help

Error:
28433 INFO: Including run-time hook 'pyi_rth_win32comgenpy.py' 28436 INFO: Including run-time hook 'pyi_rth_qt5.py' 28440 INFO: Including run-time hook 'pyi_rth__tkinter.py' 28454 INFO: Looking for dynamic libraries Traceback (most recent call last): File "c:\users\sabee\anaconda3\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\users\sabee\anaconda3\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\sabee\Anaconda3\Scripts\pyinstaller.exe\__main__.py", line 9, in <module> File "c:\users\sabee\anaconda3\lib\site-packages\PyInstaller\__main__.py", line 94, in run run_build(pyi_config, spec_file, **vars(args)) File "c:\users\sabee\anaconda3\lib\site-packages\PyInstaller\__main__.py", line 46, in run_build PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs) File "c:\users\sabee\anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 791, in main build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build')) File "c:\users\sabee\anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 737, in build exec(text, spec_namespace) File "<string>", line 16, in <module> File "c:\users\sabee\anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 213, in __init__ self.__postinit__() File "c:\users\sabee\anaconda3\lib\site-packages\PyInstaller\building\datastruct.py", line 161, in __postinit__ self.assemble() File "c:\users\sabee\anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 537, in assemble redirects=self.binding_redirects)) File "c:\users\sabee\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 224, in Dependencies for lib, npth in selectImports(pth, xtrapath): File "c:\users\sabee\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 507, in selectImports npth = getfullnameof(lib, xtrapath) File "c:\users\sabee\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 84, in getfullnameof if os.path.exists(npth) and matchDLLArch(npth): File "c:\users\sabee\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 191, in matchDLLArch pe = pefile.PE(filename, fast_load=True) File "c:\users\sabee\anaconda3\lib\site-packages\pefile.py", line 1758, in __init__ self.__parse__(name, data, fast_load) File "c:\users\sabee\anaconda3\lib\site-packages\pefile.py", line 1803, in __parse__ raise PEFormatError('The file is empty') pefile.PEFormatError: 'The file is empty'
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python-for-Android:p4a: syntax error in main.py while compiling apk jttolleson 2 1,848 Sep-17-2022, 04:09 AM
Last Post: jttolleson
  Pyinstaller 3 Python 2 mckymntl 0 1,228 Feb-07-2022, 06:28 AM
Last Post: mckymntl
  Compiling (PyInstaller issues) TheHolyPyGrenade 1 1,914 Apr-11-2021, 08:30 PM
Last Post: snippsat
  Python 3.7, Windows 10, pyinstaller, winsound, no sound in executable kmarien 3 3,667 Nov-30-2020, 04:10 PM
Last Post: buran
  Compiling SlicerCAT flaviu2 1 1,861 Sep-21-2020, 08:38 AM
Last Post: buran
  Compiling Python 3.8.5 source code results in build error Deepan 0 2,185 Sep-14-2020, 04:11 AM
Last Post: Deepan
  Compiling on win10 ebolisa 1 1,755 Sep-04-2020, 04:39 PM
Last Post: ebolisa
  Compiling to windows installer DT2000 1 1,569 May-04-2020, 09:17 PM
Last Post: DT2000
  Cannot Change Python script to exe using Pyinstaller omar_mohsen 3 2,394 Dec-19-2019, 01:05 PM
Last Post: buran
  Error in compiling cython extension on Python 3.6.4 on Windows 8 goldenmean 3 5,774 Jun-05-2019, 09:37 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020