Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EB CLI Installer error: "Getting requirements to build wheel ... error" #148

Open
adeleke-aat opened this issue Jul 20, 2023 · 20 comments
Open

Comments

@adeleke-aat
Copy link

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.

@adeleke-aat adeleke-aat changed the title Getting requirements to build wheel error when running the EB CLI Installer EB CLI Installer error: "Getting requirements to build wheel error" Jul 20, 2023
@adeleke-aat adeleke-aat changed the title EB CLI Installer error: "Getting requirements to build wheel error" EB CLI Installer error: "Getting requirements to build wheel ... error" Jul 20, 2023
@adeleke-aat
Copy link
Author

adeleke-aat commented Jul 21, 2023

I've found a few other projects with the same issue

It appears to be due to the new major version of Cython which was released on the 17th of July 2023 - https://pypi.org/project/Cython/#history

@dzhlobo
Copy link

dzhlobo commented Jul 21, 2023

I have the same issue.

It seems that this error broke our deploy process in GitHub Actions. The latest successful deploy was on July 14 and since than we have a number of updates:

You can replicate it in docker:

docker run --rm -it python:3.10-bookworm bash

In container:

git clone https://github.com/aws/aws-elastic-beanstalk-cli-setup.git /tmp/aws-eb-cli
pip install virtualenv
python /tmp/aws-eb-cli/scripts/ebcli_installer.py

Here's the log:


***********************************
1. Locating virtualenv installation
***********************************

******************************************
2. Creating exclusive virtualenv for EBCLI
******************************************
created virtual environment CPython3.10.12.final.0-64 in 804ms
  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.2, setuptools==68.0.0, wheel==0.40.0
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

************************
3. Activating virtualenv
************************

*******************
4. Installing EBCLI
*******************
Collecting awsebcli
  Downloading awsebcli-3.20.7.tar.gz (267 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 267.7/267.7 kB 2.6 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting botocore<1.29.159,>1.23.41 (from awsebcli)
  Obtaining dependency information for botocore<1.29.159,>1.23.41 from https://files.pythonhosted.org/packages/10/d8/6c2a10c5093b62d43ff94b244b73c12ea271f1d73fd06d8e391d1437fadf/botocore-1.29.158-p
y3-none-any.whl.metadata
  Downloading botocore-1.29.158-py3-none-any.whl.metadata (5.9 kB)
Collecting cement==2.8.2 (from awsebcli)
  Downloading cement-2.8.2.tar.gz (165 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 165.8/165.8 kB 2.6 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting colorama<0.4.4,>=0.2.5 (from awsebcli)
  Downloading colorama-0.4.3-py2.py3-none-any.whl (15 kB)
Collecting pathspec==0.10.1 (from awsebcli)
  Downloading pathspec-0.10.1-py3-none-any.whl (27 kB)
Collecting python-dateutil<3.0.0,>=2.1 (from awsebcli)
  Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.7/247.7 kB 2.9 MB/s eta 0:00:00
Collecting requests>=2.31 (from awsebcli)
  Obtaining dependency information for requests>=2.31 from https://files.pythonhosted.org/packages/70/8e/0e2d847013cb52cd35b38c009bb167a1a26b2ce6cd6965bf26b47bc0bf44/requests-2.31.0-py3-none-any.wh
l.metadata
  Downloading requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
Requirement already satisfied: setuptools>=20.0 in ./.ebcli-virtual-env/lib/python3.10/site-packages (from awsebcli) (68.0.0)
Collecting semantic_version==2.8.5 (from awsebcli)
  Downloading semantic_version-2.8.5-py2.py3-none-any.whl (15 kB)
Collecting six<1.15.0,>=1.11.0 (from awsebcli)
  Downloading six-1.14.0-py2.py3-none-any.whl (10 kB)
Collecting termcolor==1.1.0 (from awsebcli)
  Downloading termcolor-1.1.0.tar.gz (3.9 kB)
  Preparing metadata (setup.py) ... done
Collecting wcwidth<0.2.0,>=0.1.7 (from awsebcli)
  Downloading wcwidth-0.1.9-py2.py3-none-any.whl (19 kB)
Collecting PyYAML<5.5,>=5.3.1 (from awsebcli)
  Downloading PyYAML-5.4.1.tar.gz (175 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 175.1/175.1 kB 3.9 MB/s eta 0:00:00
  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
  ╰─> [62 lines of output]
      /tmp/pip-build-env-ty5jw2d9/overlay/lib/python3.10/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.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/root/.ebcli-virtual-env/lib/python3.10/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.10/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-ty5jw2d9/overlay/lib/python3.10/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-ty5jw2d9/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-ty5jw2d9/overlay/lib/python3.10/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-ty5jw2d9/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
        File "/tmp/pip-build-env-ty5jw2d9/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/tmp/pip-build-env-ty5jw2d9/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-ty5jw2d9/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-ty5jw2d9/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1234, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-ty5jw2d9/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-ty5jw2d9/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 314, in run
          self.find_sources()
        File "/tmp/pip-build-env-ty5jw2d9/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 322, in find_sources
          mm.run()
        File "/tmp/pip-build-env-ty5jw2d9/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 551, in run
          self.add_defaults()
        File "/tmp/pip-build-env-ty5jw2d9/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 589, in add_defaults
          sdist.add_defaults(self)
        File "/tmp/pip-build-env-ty5jw2d9/overlay/lib/python3.10/site-packages/setuptools/command/sdist.py", line 104, in add_defaults
          super().add_defaults()
        File "/tmp/pip-build-env-ty5jw2d9/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults
          self._add_defaults_ext()
        File "/tmp/pip-build-env-ty5jw2d9/overlay/lib/python3.10/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-ty5jw2d9/overlay/lib/python3.10/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.

I tried to install virtualenv 20.23.1 (pip install virtualenv==20.23.1) but I'm getting the same error.

@damiandoan
Copy link

damiandoan commented Jul 21, 2023

I got the same issue with you. But I resolved it by downgrade from python 3.10 to 3.8

@jdvin
Copy link

jdvin commented Jul 24, 2023

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

@surajde16
Copy link

Same error, Please post the quick fix for this

@adeleke-aat
Copy link
Author

adeleke-aat commented Jul 25, 2023

@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

@joachimmartin
Copy link

Pleeeeeese fix this! I am not that experienced with python or virtualenv and I'm just running this install script as part of a CI/CD build. I cannot get any of the workarounds to work for me!

@joachimmartin
Copy link

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

@estefrare
Copy link

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

@zuhailkhan
Copy link

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

@brivu
Copy link

brivu commented Aug 11, 2023

I get the same issue here. While the work around is valid, the installation uses PyYAML version 5.3.1.

There was a similar issue with the aws cli as well. The developer from AWS did not recommend using PyYAML 5.3.1 due to a security issue:

"We do not recommend installing an older version of PyYAML as PyYAML version 5.3.1 is associated with CVE-2020-14343 that was fixed in version 5.4."

They resolved this issue by extending support to PyYAML 6.0. You can find the issue here:

aws/aws-cli#8036

@hex-spell
Copy link

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

@m-hollow
Copy link

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)

@Sherry112
Copy link

Sherry112 commented Aug 23, 2023

@Modulariz thank you. Your quick fix works.

@swiffer
Copy link

swiffer commented Sep 3, 2023

3 weeks without any fix in sight? 😬

@cartwrightian
Copy link

I have left feedback at https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install.html since it refers people to this installation process which obviously does not work, maybe someone from AWS could update that page so folks don't waste their time.

@swiffer
Copy link

swiffer commented Sep 21, 2023

https://github.com/aws/aws-elastic-beanstalk-cli/blob/master/CHANGES.rst#32010-2023-09-15

But not published to PyPi yet.

@GeraldScott
Copy link

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

@mlawlerau
Copy link

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!

@airdrummingfool
Copy link

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

zaro0508 added a commit to Sage-Bionetworks/synapse-login-scipool that referenced this issue Sep 29, 2023
customize the EB CLI installation using a modified action from install-eb-cli-action[1]
to work around issue aws/aws-elastic-beanstalk-cli-setup#148

The idea is to install a specific version of python with a specific version of EB CLI to
make a compatible pair.

[1] https://github.com/sparkplug-app/install-eb-cli-action
zaro0508 added a commit to zaro0508/synapse-login-scipool that referenced this issue Oct 2, 2023
attempt to fix ebcli by installing a specific version of pyyaml[1]

[1] aws/aws-elastic-beanstalk-cli-setup#148 (comment)
zaro0508 added a commit to Sage-Bionetworks/synapse-login-scipool that referenced this issue Oct 2, 2023
attempt to fix ebcli by installing a specific version of pyyaml[1]

[1] aws/aws-elastic-beanstalk-cli-setup#148 (comment)
zaro0508 added a commit to zaro0508/synapse-login-scipool that referenced this issue Oct 4, 2023
Installation of EB CLI failed, we try to switch to installing
from pypi with the workaround suggestion from
aws/aws-elastic-beanstalk-cli-setup#148 (comment)
zaro0508 added a commit to Sage-Bionetworks/synapse-login-scipool that referenced this issue Oct 4, 2023
Installation of EB CLI failed, we try to switch to installing
from pypi with the workaround suggestion from
aws/aws-elastic-beanstalk-cli-setup#148 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests