setup-sam: Error: Getting requirements to build wheel did not run successfully
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`
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 35
- Comments: 29 (7 by maintainers)
Commits related to this issue
- try to fix this issue https://github.com/aws-actions/setup-sam/issues/82 — committed to aws-samples/serverless-dotnet-demo by Beau-Gosse-dev a year ago
- install deps as user to resolve #https://github.com/aws-actions/setup-sam/issues/82 — committed to aws/deep-learning-containers by haixiw 7 months ago
- HuggingFace PT Inference/training CVE fix (#3523) * HuggingFace Inference CVE fix * Add more CVEs * Add toml change to trigger tests * refactor the code base * Add more CVEs * update v... — committed to aws/deep-learning-containers by haixiw 7 months ago
I had the same problem, enabling use-installer made it work for me:
https://github.com/aws-actions/setup-sam/pull/83 is merged and should now work.
v2
points to https://github.com/aws-actions/setup-sam/commit/d388945c16af7a5b3da65436576e1c2be088f040.Also could someone for who https://github.com/aws-actions/setup-sam/issues/82#issuecomment-1638483497 did not work provide some more information:
We haven’t been able to reproduce, so that information could help us improve.
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.Sam here!
@hamzashabbir11 Please elaborate, it’s difficult to help without more information.
What exact workflow snippet is not working?
What is the exact error logs that you observe?
What is the error when you try using the example below?
Note also that you should be using
v2
, notv1
, which hasn’t been updated for nearly 2 years.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.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
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: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 foraws-actions/setup-sam
).Use https://github.com/aws-actions/setup-sam/issues/82#issuecomment-1638483497 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. https://github.com/aws-actions/setup-sam/issues/64#issuecomment-1368755583 or https://github.com/aws-actions/setup-sam/issues/64#issuecomment-1369724002. So something like this (from https://github.com/yaml/pyyaml/issues/724#issuecomment-1638636728) might also work (untested):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 orpip
at all, so it’s not clear to me why it wouldn’t work.