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

Error: Getting requirements to build wheel did not run successfully #82

Closed
cc-simon opened this issue Jul 17, 2023 · 29 comments
Closed
Labels
bug Something isn't working dependencies Pull requests that update a dependency file

Comments

@cc-simon
Copy link

The setup-sam@v2 build action is failing all our pipelines

the error message is-
Getting requirements to build wheel did not run successfully

I get the following stack trace

exit code: 1 ╰─> [68 lines of output] /tmp/pip-build-env-w2zxlt4k/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 "/home/runner/work/_temp/setup-sam-ga5CTW/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/home/runner/work/_temp/setup-sam-ga5CTW/.venv/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 "/home/runner/work/_temp/setup-sam-ga5CTW/.venv/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-w2zxlt4k/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-w2zxlt4k/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
      self.run_setup()
    File "/tmp/pip-build-env-w2zxlt4k/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-w2zxlt4k/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup
      return distutils.core.setup(**attrs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-w2zxlt4k/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
      return run_commands(dist)
             ^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-w2zxlt4k/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
      dist.run_commands()
    File "/tmp/pip-build-env-w2zxlt4k/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "/tmp/pip-build-env-w2zxlt4k/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1[234](https://github.com/CloudCall-Engineering/syncconnectors-bullhorn/actions/runs/5577482690/jobs/10190902096#step:4:238), in run_command
      super().run_command(command)
    File "/tmp/pip-build-env-w2zxlt4k/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/tmp/pip-build-env-w2zxlt4k/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 314, in run
      self.find_sources()
    File "/tmp/pip-build-env-w2zxlt4k/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 322, in find_sources
      mm.run()
    File "/tmp/pip-build-env-w2zxlt4k/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 551, in run
      self.add_defaults()
    File "/tmp/pip-build-env-w2zxlt4k/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-w2zxlt4k/overlay/lib/python3.11/site-packages/setuptools/command/sdist.py", line 104, in add_defaults
      super().add_defaults()
    File "/tmp/pip-build-env-w2zxlt4k/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line [251](https://github.com/CloudCall-Engineering/syncconnectors-bullhorn/actions/runs/5577482690/jobs/10190902096#step:4:255), in add_defaults
      self._add_defaults_ext()
    File "/tmp/pip-build-env-w2zxlt4k/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-w2zxlt4k/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.
Error: The process '/home/runner/work/_temp/setup-sam-ga5CTW/.venv/bin/python' failed with exit code 1`

@justinwb
Copy link

Can also confirm that I'm now seeing the same behavior

@hiramhuang
Copy link

Same issue here

@CesarCarrillo91
Copy link

Same here.

@cortex
Copy link

cortex commented Jul 17, 2023

I had the same problem, enabling use-installer made it work for me:

      - uses: aws-actions/setup-sam@v2
        with:
            use-installer: true

@justinwb
Copy link

I was already running with the use-installer parameter set to true - so I can confirm that at least for me, that is not a fix.

I had the same problem, enabling use-installer made it work for me:

      - uses: aws-actions/setup-sam@v2
        with:
            use-installer: true

@cc-simon
Copy link
Author

I was already running with the use-installer parameter set to true - so I can confirm that at least for me, that is not a fix.

I had the same problem, enabling use-installer made it work for me:

  - uses: aws-actions/setup-sam@v2
    with:
        use-installer: true

Same I tried this too, it didn't help

@gastonsilva
Copy link

@arantesxyz
Copy link

arantesxyz commented Jul 17, 2023

Sam here!

@DanskySantos
Copy link

DanskySantos commented Jul 17, 2023

$ pip install awscli
Collecting awscli
  Obtaining dependency information for awscli from https://files.pythonhosted.org/packages/43/9c/bf16d97f5de8aa4f9171c6c82bad0b[41](https://gitlab.com/blue-tech/crediblue-api/-/jobs/4671359200#L41)79921ddca5066ba980358da0e9a5/awscli-1.29.3-py3-none-any.whl.metadata
  Downloading awscli-1.29.3-py3-none-any.whl.metadata (11 kB)
Collecting botocore==1.31.3 (from awscli)
  Obtaining dependency information for botocore==1.31.3 from https://files.pythonhosted.org/packages/b0/f0/5755508b3305534cd4cf2a8a82bbbe[42](https://gitlab.com/blue-tech/crediblue-api/-/jobs/4671359200#L42)ee9d66fd2688be5ff3dfb85e9a99/botocore-1.31.3-py3-none-any.whl.metadata
  Downloading botocore-1.31.3-py3-none-any.whl.metadata (5.9 kB)
Collecting docutils<0.17,>=0.10 (from awscli)
  Downloading docutils-0.16-py2.py3-none-any.whl (5[48](https://gitlab.com/blue-tech/crediblue-api/-/jobs/4671359200#L48) kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 548.2/548.2 kB 9.5 MB/s eta 0:00:00
Collecting s3transfer<0.7.0,>=0.6.0 (from awscli)
  Downloading s3transfer-0.6.1-py3-none-any.whl (79 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.8/79.8 kB 10.5 MB/s eta 0:00:00
Collecting PyYAML<5.5,>=3.10 (from awscli)
  Downloading PyYAML-5.4.1.tar.gz (175 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 175.1/175.1 kB 24.9 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status '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-isnoxeh9/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 "/usr/local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/usr/local/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 "/usr/local/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-isnoxeh9/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-isnoxeh9/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-isnoxeh9/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-isnoxeh9/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-isnoxeh9/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-isnoxeh9/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-isnoxeh9/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-isnoxeh9/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-isnoxeh9/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-isnoxeh9/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 314, in run
          self.find_sources()
        File "/tmp/pip-build-env-isnoxeh9/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 322, in find_sources
          mm.run()
        File "/tmp/pip-build-env-isnoxeh9/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 5[51](https://gitlab.com/blue-tech/crediblue-api/-/jobs/4671359200#L51), in run
          self.add_defaults()
        File "/tmp/pip-build-env-isnoxeh9/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line [58](https://gitlab.com/blue-tech/crediblue-api/-/jobs/4671359200#L58)9, in add_defaults
          sdist.add_defaults(self)
        File "/tmp/pip-build-env-isnoxeh9/overlay/lib/python3.11/site-packages/setuptools/command/sdist.py", line 104, in add_defaults
          super().add_defaults()
        File "/tmp/pip-build-env-isnoxeh9/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-isnoxeh9/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-isnoxeh9/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line [107](https://gitlab.com/blue-tech/crediblue-api/-/jobs/4671359200#L107), 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.
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: exit code 1

@hoffa
Copy link
Contributor

hoffa commented Jul 17, 2023

Use #82 (comment) as workaround. It's the recommended approach in any case, and provides faster installation.

FYI if you're not using use-installer, you can override PyPI dependency versions with e.g. #64 (comment) or #64 (comment). So something like this (from yaml/pyyaml#724 (comment)) might also work (untested):

      - name: Hotfix for https://github.com/aws-actions/setup-sam/issues/82
        run: |
          $(dirname $(readlink $(which sam)))/pip install "cython<3.0.0"
          $(dirname $(readlink $(which sam)))/pip install --no-build-isolation pyyaml==5.4.1

Also could someone that has use-installer: true post what is the error message and at what step does it happen? use-installer doesn't use PyPI or pip at all, so it's not clear to me why it wouldn't work.

@hawflau
Copy link
Contributor

hawflau commented Jul 17, 2023

As for the workaround, please pin PyYAML to 5.4.1, because of the requirements of SAM CLI and its dependencies.

@hoffa However, I don't fully understand - Can customer specify which Python version to use in this GH Action? AFAIK, it's only breaking when Python version is 3.10+

@hoffa
Copy link
Contributor

hoffa commented Jul 18, 2023

@hoffa However, I don't fully understand - Can customer specify which Python version to use in this GH Action? AFAIK, it's only breaking when Python version is 3.10+

If using the recommended use-installer: true, it uses the native installers, skipping the separate Python interpreter and PyPI altogether.

Without it, the Python interpreter can be specified with the python option.

@hoffa hoffa added bug Something isn't working dependencies Pull requests that update a dependency file labels Jul 18, 2023
@hamzashabbir11
Copy link

Tried all the Above Fixes. None of them Worked for me. I am using sam@v1
- uses: aws-actions/setup-sam@v2

@KhanjanMarthak
Copy link

I am having the same issue. Above Fixes are not working.

@jay-patel-simformsolutions

+1, Need help

@mik3fly
Copy link

mik3fly commented Jul 18, 2023

pLeAsE HeLp

@hoffa
Copy link
Contributor

hoffa commented Jul 18, 2023

#83 is merged and should now work. v2 points to d388945.

Also could someone for who #82 (comment) did not work provide some more information:

Also could someone that has use-installer: true post what is the error message and at what step does it happen? use-installer doesn't use PyPI or pip at all, so it's not clear to me why it wouldn't work.

We haven't been able to reproduce, so that information could help us improve.

@hamzashabbir11
Copy link

Still Not Working

@hoffa
Copy link
Contributor

hoffa commented Jul 18, 2023

Still Not Working

@hamzashabbir11 Please elaborate, it's difficult to help without more information.

  1. What exact workflow snippet is not working?

  2. What is the exact error logs that you observe?

  3. What is the error when you try using the example below?

      - uses: aws-actions/setup-sam@v2
        with:
            use-installer: true

Note also that you should be using v2, not v1, which hasn't been updated for nearly 2 years.

@hamzashabbir11
Copy link

      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
      - uses: aws-actions/setup-sam@v1
      - uses: aws-actions/configure-aws-credentials@v1
image

This is my Error and Code Snippet for Pipeline. Okay so I am using v1. Let me upgrade it to v2.

@mik3fly
Copy link

mik3fly commented Jul 18, 2023

working on aws-actions/setup-sam@main and @v2 for me

@KhanjanMarthak
Copy link

Working with v2. Code has been Updated 2hours ago.

@hoffa
Copy link
Contributor

hoffa commented Jul 18, 2023

Thanks for confirming and for your patience, closing now. If any issues persist, please open a new issue.


All, please make sure you're using v2.

Also, I highly recommend adding use-installer: true going forward:

  - uses: aws-actions/setup-sam@v2
    with:
        use-installer: true

It will make installation a lot faster, it doesn't use PyPI (hence not impacted by sudden transient dependency changes such as this), and doesn't require a separate Python installation (i.e. you can get rid of actions/setup-python if you only used it for aws-actions/setup-sam).

@hamzashabbir11
Copy link

Error: PythonPipBuilder:Validation - Binary validation failed for python, searched for python in following locations : ['/opt/hostedtoolcache/Python/3.7.17/x64/bin/python', '/opt/hostedtoolcache/Python/3.7.17/x64/python', '/usr/bin/python', '/bin/python', '/opt/hostedtoolcache/Python/3.7.17/x64/bin/python3', '/usr/bin/python3', '/bin/python3'] which did not satisfy constraints for runtime: python3.8. Do you have python for runtime: python3.8 on your PATH?

Getting this Error.

@hoffa
Copy link
Contributor

hoffa commented Jul 19, 2023

@hamzashabbir11 Make sure you have Python 3.8 installed.

@aron-radvanyi
Copy link

image

Install the PyYAML 5.3.1 and then run pip install rasa. That works currently solving the PyYAML-5.4.1.tar.gz error until they update at Rasa.

Just run: pip install PyYAML==5.3.1 pip install rasa

@pererasu
Copy link

Reverting back to pyyaml 5.4.1 worked for me. Was trying to go to 6.0.1.

haixiw pushed a commit to aws/deep-learning-containers that referenced this issue Nov 18, 2023
@jenilkeavdiya
Copy link

after installing PyYAML and rasa, still getting same subprocess error

tejaschumbalkar added a commit to aws/deep-learning-containers that referenced this issue Dec 6, 2023
* HuggingFace Inference CVE fix

* Add more CVEs

* Add toml change to trigger tests

* refactor the code base

* Add more CVEs

* update version to be compatible with python version

* update scipy to latest version

* remove dependencies not compatible with current python

* update allowlist

* fix typo

* fix build error on opencv

* add ignore id for safety check

* add ignore ids to both training and inference

* try to fix some build errors

* add mkl as dependency to address some failures

* update the HF inference toolkit

* update diffuser version to resolve conflicts between huggingface inference toolkit

* update pyYaml to consistent with awscli

* install deps as user to resolve #aws-actions/setup-sam#82

* downgrade cpython to resolve break dependency with pyyaml

* update install tag

* exclude training image from the commit

* Revert "exclude training image from the commit"

This reverts commit e61eabb.

* Add training image back

* specify awscli version

* change download order for awscli and pyyaml

* allowlist pyarrow

* update pyyaml

* Revert "Add toml change to trigger tests"

This reverts commit 4451330.

---------

Co-authored-by: arjkesh <33526713+arjkesh@users.noreply.github.com>
Co-authored-by: Tejas Chumbalkar <34728580+tejaschumbalkar@users.noreply.github.com>
@Jonaid97
Copy link

I've also got the same error while pip pulse2percept. Can anyone also encounters the same error please help how to resolve it?

0x0elliot added a commit to thirdeye-dev/thirdeye that referenced this issue Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests