OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

GitHub Actions Workflow with Poetry Failing: "Backend subprocess exited when trying to invoke build_wheel"

  • Thread starter Thread starter Nadav
  • Start date Start date
N

Nadav

Guest
I'm encountering an issue with my GitHub Actions workflow that uses Poetry for dependency management. The workflow has been working fine until recently, but now it fails during the virtual environment creation and package installation steps. The error log is as follows:

Code:
[virtualenv] create virtual environment via CPython3Posix(dest=/tmp/tmp0id2fedr/.venv, clear=False, no_vcs_ignore=False, global=False)
2024-06-19T20:48:12.0128143Z [virtualenv] create folder /tmp/tmp0id2fedr/.venv/bin
2024-06-19T20:48:12.0128439Z [virtualenv] create folder /tmp/tmp0id2fedr/.venv/lib/python3.10/site-packages
...
2024-06-19T20:48:12.0142856Z [virtualenv] add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
2024-06-19T20:48:12.0143272Z Source (PyPI): 217 packages found for setuptools >=40.8.0
2024-06-19T20:48:12.0143401Z Source (PyPI): 1 packages found for setuptools >=40.8.0
2024-06-19T20:48:12.0143457Z [build:build] Getting build dependencies for wheel...
...
2024-06-19T20:48:12.0152045Z   1  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/chef.py:121 in prepare
2024-06-19T20:48:12.0152216Z       119│         if archive.is_dir():
2024-06-19T20:48:12.0152536Z       120│             destination = output_dir or Path(tempfile.mkdtemp(prefix="poetry-chef-"))
2024-06-19T20:48:12.0152846Z     → 121│             return self._prepare(archive, destination=destination, editable=editable)
2024-06-19T20:48:12.0152962Z       122│ 
2024-06-19T20:48:12.0153246Z       123│         return self._prepare_sdist(archive, destination=output_dir)
2024-06-19T20:48:12.0153254Z 
2024-06-19T20:48:12.0153357Z   ChefBuildError
2024-06-19T20:48:12.0153367Z 
2024-06-19T20:48:12.0153548Z   Backend subprocess exited when trying to invoke build_wheel
2024-06-19T20:48:12.0153790Z   
2024-06-19T20:48:12.0154053Z   We need both setuptools AND wheel packages installed for bdist_wheel to work. Try running: pip install wheel
2024-06-19T20:48:12.0154149Z   
2024-06-19T20:48:12.0154157Z 
2024-06-19T20:48:12.0154533Z   at ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/chef.py:164 in _prepare
2024-06-19T20:48:12.0154650Z       160│ 
2024-06-19T20:48:12.0154912Z       161│                 error = ChefBuildError("\n\n".join(message_parts))
2024-06-19T20:48:12.0155024Z       162│ 
2024-06-19T20:48:12.0155204Z       163│             if error is not None:
2024-06-19T20:48:12.0155394Z     → 164│                 raise error from None
2024-06-19T20:48:12.0155507Z       165│ 
2024-06-19T20:48:12.0155680Z       166│             return path
2024-06-19T20:48:12.0155796Z       167│ 
2024-06-19T20:48:12.0156109Z       168│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:
2024-06-19T20:48:12.0169670Z ##[error]Process completed with exit code 1.

The main error seems to be:

Code:
ChefBuildError
Backend subprocess exited when trying to invoke build_wheel
We need both setuptools AND wheel packages installed for bdist_wheel to work. Try running: pip install wheel

Does anyone have any suggestions on how to resolve this issue?

Additional Context:

  • GitHub Actions runner is using Python 3.10.14
  • This issue started happening without any changes to the workflow file
  • I tried installing wheel and setuptools (with the latest version) but it didn't help

Thank you for your help!
<p>I'm encountering an issue with my GitHub Actions workflow that uses Poetry for dependency management. The workflow has been working fine until recently, but now it fails during the virtual environment creation and package installation steps. The error log is as follows:</p>
<pre><code>[virtualenv] create virtual environment via CPython3Posix(dest=/tmp/tmp0id2fedr/.venv, clear=False, no_vcs_ignore=False, global=False)
2024-06-19T20:48:12.0128143Z [virtualenv] create folder /tmp/tmp0id2fedr/.venv/bin
2024-06-19T20:48:12.0128439Z [virtualenv] create folder /tmp/tmp0id2fedr/.venv/lib/python3.10/site-packages
...
2024-06-19T20:48:12.0142856Z [virtualenv] add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
2024-06-19T20:48:12.0143272Z Source (PyPI): 217 packages found for setuptools >=40.8.0
2024-06-19T20:48:12.0143401Z Source (PyPI): 1 packages found for setuptools >=40.8.0
2024-06-19T20:48:12.0143457Z [build:build] Getting build dependencies for wheel...
...
2024-06-19T20:48:12.0152045Z 1 ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/chef.py:121 in prepare
2024-06-19T20:48:12.0152216Z 119│ if archive.is_dir():
2024-06-19T20:48:12.0152536Z 120│ destination = output_dir or Path(tempfile.mkdtemp(prefix="poetry-chef-"))
2024-06-19T20:48:12.0152846Z → 121│ return self._prepare(archive, destination=destination, editable=editable)
2024-06-19T20:48:12.0152962Z 122│
2024-06-19T20:48:12.0153246Z 123│ return self._prepare_sdist(archive, destination=output_dir)
2024-06-19T20:48:12.0153254Z
2024-06-19T20:48:12.0153357Z ChefBuildError
2024-06-19T20:48:12.0153367Z
2024-06-19T20:48:12.0153548Z Backend subprocess exited when trying to invoke build_wheel
2024-06-19T20:48:12.0153790Z
2024-06-19T20:48:12.0154053Z We need both setuptools AND wheel packages installed for bdist_wheel to work. Try running: pip install wheel
2024-06-19T20:48:12.0154149Z
2024-06-19T20:48:12.0154157Z
2024-06-19T20:48:12.0154533Z at ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/chef.py:164 in _prepare
2024-06-19T20:48:12.0154650Z 160│
2024-06-19T20:48:12.0154912Z 161│ error = ChefBuildError("\n\n".join(message_parts))
2024-06-19T20:48:12.0155024Z 162│
2024-06-19T20:48:12.0155204Z 163│ if error is not None:
2024-06-19T20:48:12.0155394Z → 164│ raise error from None
2024-06-19T20:48:12.0155507Z 165│
2024-06-19T20:48:12.0155680Z 166│ return path
2024-06-19T20:48:12.0155796Z 167│
2024-06-19T20:48:12.0156109Z 168│ def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:
2024-06-19T20:48:12.0169670Z ##[error]Process completed with exit code 1.

</code></pre>
<p>The main error seems to be:</p>
<pre><code>ChefBuildError
Backend subprocess exited when trying to invoke build_wheel
We need both setuptools AND wheel packages installed for bdist_wheel to work. Try running: pip install wheel
</code></pre>
<p>Does anyone have any suggestions on how to resolve this issue?</p>
<p>Additional Context:</p>
<ul>
<li>GitHub Actions runner is using Python 3.10.14</li>
<li>This issue started happening without any changes to the workflow file</li>
<li>I tried installing wheel and setuptools (with the latest version) but it didn't help</li>
</ul>
<p>Thank you for your help!</p>
 

Latest posts

Top