aws-elastic-beanstalk-cli-setup: EB CLI Installer error: "Getting requirements to build wheel ... error"

1. Please specify the following:

  • OS: Debian 12 (bookworm)
  • Shell: Bash
  • Python: 3.11.2

2. Description I am getting the following error when running the EB CLI Installer in a Docker container running Debian 12 (bookworm) with Python 3.11.2 “Getting requirements to build wheel … error”

It was working fine 10 days ago but when I attempted to install it today I am unable to.

The full output is:


  1. Locating virtualenv installation


  1. Creating exclusive virtualenv for EBCLI

created virtual environment CPython3.11.2.final.0-64 in 265ms creator CPython3Posix(dest=/root/.ebcli-virtual-env, clear=False, no_vcs_ignore=False, global=False) seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/root/.local/share/virtualenv) added seed packages: pip==23.0.1, setuptools==66.1.1, wheel==0.38.4 activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator


  1. Activating virtualenv


  1. Installing EBCLI

Collecting awsebcli Using cached awsebcli-3.20.7.tar.gz (267 kB) Preparing metadata (setup.py) … done Collecting PyYAML<5.5,>=5.3.1 Using cached PyYAML-5.4.1.tar.gz (175 kB) Installing build dependencies … done Getting requirements to build wheel … error error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [68 lines of output] /tmp/pip-build-env-1lg0xzzk/overlay/lib/python3.11/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in setup.cfg !!

          ********************************************************************************
          The license_file parameter is deprecated, use license_files instead.
  
          By 2023-Oct-30, you need to update your project and remove deprecated calls
          or your builds will no longer be supported.
  
          See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
          ********************************************************************************
  
  !!
    parsed = self.parsers.get(option_name, lambda x: x)(value)
  running egg_info
  writing lib3/PyYAML.egg-info/PKG-INFO
  writing dependency_links to lib3/PyYAML.egg-info/dependency_links.txt
  writing top-level names to lib3/PyYAML.egg-info/top_level.txt
  Traceback (most recent call last):
    File "/root/.ebcli-virtual-env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/root/.ebcli-virtual-env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/root/.ebcli-virtual-env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
      return hook(config_settings)
             ^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-1lg0xzzk/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-1lg0xzzk/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
      self.run_setup()
    File "/tmp/pip-build-env-1lg0xzzk/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 338, in run_setup
      exec(code, locals())
    File "<string>", line 271, in <module>
    File "/tmp/pip-build-env-1lg0xzzk/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup
      return distutils.core.setup(**attrs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-1lg0xzzk/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
      return run_commands(dist)
             ^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-1lg0xzzk/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
      dist.run_commands()
    File "/tmp/pip-build-env-1lg0xzzk/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "/tmp/pip-build-env-1lg0xzzk/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command
      super().run_command(command)
    File "/tmp/pip-build-env-1lg0xzzk/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/tmp/pip-build-env-1lg0xzzk/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 314, in run
      self.find_sources()
    File "/tmp/pip-build-env-1lg0xzzk/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 322, in find_sources
      mm.run()
    File "/tmp/pip-build-env-1lg0xzzk/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 551, in run
      self.add_defaults()
    File "/tmp/pip-build-env-1lg0xzzk/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 589, in add_defaults
      sdist.add_defaults(self)
    File "/tmp/pip-build-env-1lg0xzzk/overlay/lib/python3.11/site-packages/setuptools/command/sdist.py", line 104, in add_defaults
      super().add_defaults()
    File "/tmp/pip-build-env-1lg0xzzk/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults
      self._add_defaults_ext()
    File "/tmp/pip-build-env-1lg0xzzk/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 336, in _add_defaults_ext
      self.filelist.extend(build_ext.get_source_files())
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "<string>", line 201, in get_source_files
    File "/tmp/pip-build-env-1lg0xzzk/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
      raise AttributeError(attr)
  AttributeError: cython_sources
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Reactions: 33
  • Comments: 20

Commits related to this issue

Most upvoted comments

I was able to fix this by adding --no-build-isolation to the install_args at line 554

The problem has to do with version of PyYAML that the installer attempts to build as a dependency. I got around it by creating a virtualenv with Python 3.8.17, then running: pip install pyyaml==5.3.1. After that you can install awsebscli manually: pip install awsebcli --upgrade --user

3 weeks without any fix in sight? 😬

@jdvin’s suggestion worked for me as a work around until the issue is resolved.

Using a container created from a Python image

docker run --rm -it python:3.11-bookworm bash
apt update
python -m venv /tmp/python-env
export PATH=/tmp/python-env/bin/:$PATH
pip install pyyaml==5.3.1
pip install awsebcli --upgrade
eb --version

Using a container created from a Debian image

docker run --rm -it debian:bookworm bash
apt update
apt install -y python3 python3-pip python3-venv
python3 -m venv /tmp/python-env
export PATH=/tmp/python-env/bin/:$PATH
pip install pyyaml==5.3.1
pip install awsebcli --upgrade
eb --version

I installed it using brew install awsebcli and It worked fine.

hoping awsebcli can be updated ASAP, becoming compliant with PyYAML == 6.0

currently the awsebcli crashes on installation. workarounds require downgrades to PyYAML (not acceptable in my situation)

I was able to fix this by adding --no-build-isolation to the install_args at line 554

Thanks @hex-spell , this is the only solution that worked for me. Right on brother!

This is an error in PyYAML, caused by an upgrade to Cython 3.0 (see here).

I fixed it by downgrading my installation of PyYAML

sudo pip uninstall PyYAML
sudo pip install PyYAML==5.3.1

I’ve written a sed command that automates @hex-spell’s fix (thanks for it!). This adds the '--no-build-isolation' option at the end of the install_args array (including matching indent and trailing comma, because why not). You will need to adjust the path to aws-elastic-beanstalk-cli-setup for your setup.

Note that since this command has a hard-coded line number, it can break if the ebcli_installer.py file is modified.

sed -i "558i\            '--no-build-isolation'," /tmp/aws-elastic-beanstalk-cli-setup/scripts/ebcli_installer.py

@Modulariz thank you. Your quick fix works.

downgrading python to 3.7.17 and then running ebcli_installer worked for me.

I did actually get this working by following @jdvin’s steps.