-1

I am working on Ubuntu 20.04 LTS. I am trying to build exe files from my python files. But I am facing an issue while installing requirements.txt, I am using Python 3.8.10 version.

These are the error:

Building wheels for collected packages: PyInstaller
  Building wheel for PyInstaller (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for PyInstaller (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      running bdist_wheel
      running build
      running build_bootloader
      Setting top to                           : /tmp/pip-install-iy49ulu4/pyinstaller_c5cf1762e2fd49588e5f6007c79b4445/bootloader
      Setting out to                           : /tmp/pip-install-iy49ulu4/pyinstaller_c5cf1762e2fd49588e5f6007c79b4445/bootloader/build
      Python Version                           : 3.8.10 (default, Mar 15 2022, 12:22:08) [GCC 9.4.0]
      Checking for 'gcc' (C compiler)          : /usr/bin/gcc
      Checking size of pointer                 : 8
      Platform                                 : Linux-64bit detected based on compiler
      Checking for program '/usr/bin/strip'    : /usr/bin/strip
      Checking for program 'strip'             : /usr/bin/strip
      Checking for library dl                  : yes
      Checking for library m                   : yes
      Checking for library z                   : not found
      The configuration failed
      (complete log in /tmp/pip-install-iy49ulu4/pyinstaller_c5cf1762e2fd49588e5f6007c79b4445/bootloader/build/config.log)
      No precompiled bootloader found. Trying to compile it for you ...
      ERROR: Failed compiling the bootloader. Please compile manually and rerun setup.py
      [end of output]

  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for PyInstaller
Failed to build PyInstaller
ERROR: Could not build wheels for PyInstaller, which is required to install pyproject.toml-based projects

I have attached Screen shot for further reference.

enter image description here

Please help me out this

2
  • 1
    Oof, why are you running as root? This will mess up all the permissions.
    – mchid
    Jun 23, 2022 at 6:24
  • I am using root user for permission issues. can you please explain any issues that? Jun 24, 2022 at 5:37

1 Answer 1

0

You should run the following as a non-root user.

pip3 install --upgrade pip

Log out and log back in and then run the following commands (again, as a non-root user):

pip install --upgrade wheel
pip install --upgrade PyInstaller
5
  • I've tried all these commands, still I am facing the same issues. is there any other way to sort it out. Jun 24, 2022 at 9:25
  • What does which wheel return?
    – mchid
    Jun 24, 2022 at 10:12
  • Also, install zlib: sudo apt update and sudo apt install zlib
    – mchid
    Jun 24, 2022 at 10:20
  • "which wheel " showing nothing, also I've tried "sudo which wheel". But no output. Jun 24, 2022 at 10:31
  • Log out and log back in and try again.
    – mchid
    Jun 24, 2022 at 11:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .