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

Installation of 6.0.x fails with ChefBuildError #854

Closed
m4rc3l-h3 opened this issue Jul 29, 2024 · 4 comments · Fixed by #856
Closed

Installation of 6.0.x fails with ChefBuildError #854

m4rc3l-h3 opened this issue Jul 29, 2024 · 4 comments · Fixed by #856

Comments

@m4rc3l-h3
Copy link

Hi, thank you for this great project and all the effort put into it!

I am trying to install vcrpy 6.0.x via poetry in the following environment:

  • VSCode Remote Development container based on mcr.microsoft.com/vscode/devcontainers/python:1-3.12-bullseye
  • Python 3.12.3
  • pip 24.0
    with the following command: sudo poetry add vcrpy which fails with the following error message:
Using version ^6.0.1 for vcrpy

Updating dependencies
Resolving dependencies... (23.1s)

Package operations: 3 installs, 0 updates, 0 removals

  - Installing multidict (6.0.5)
  - Installing yarl (1.9.4)
  - Installing vcrpy (6.0.1): Failed

  ChefBuildError

  Backend subprocess exited when trying to invoke get_requires_for_build_wheel
  
  Traceback (most recent call last):
    File "/usr/local/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in <module>
      main()
    File "/usr/local/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 357, in main
      json_out["return_val"] = hook(**hook_input["kwargs"])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 134, in get_requires_for_build_wheel
      return hook(config_settings)
             ^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/tmpkxeii9bm/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=[])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/tmpkxeii9bm/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
      self.run_setup()
    File "/tmp/tmpkxeii9bm/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 497, in run_setup
      super().run_setup(setup_script=setup_script)
    File "/tmp/tmpkxeii9bm/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 313, in run_setup
      exec(code, locals())
    File "<string>", line 9, in <module>
  ModuleNotFoundError: No module named 'setuptools.command.test'
  

  at /usr/local/lib/python3.12/site-packages/poetry/installation/chef.py:164 in _prepare
      160│ 
      161│                 error = ChefBuildError("\n\n".join(message_parts))
      162│ 
      163│             if error is not None:
    → 164│                 raise error from None
      165│ 
      166│             return path
      167│ 
      168│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with vcrpy (6.0.1) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "vcrpy (==6.0.1)"'.

Running the command in the error message gives me the following:

sudo pip wheel --no-cache-dir --use-pep517 "vcrpy (==6.0.1)"
Collecting vcrpy==6.0.1
  Downloading vcrpy-6.0.1.tar.gz (84 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 84.8/84.8 kB 2.7 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
  ╰─> [21 lines of output]
      pip_system_certs: ERROR: could not register module: No module named 'wrapt'
      Traceback (most recent call last):
        File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/usr/local/lib/python3.12/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.12/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-ht8hszm9/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-ht8hszm9/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-ht8hszm9/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 497, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-ht8hszm9/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 313, in run_setup
          exec(code, locals())
        File "<string>", line 9, in <module>
      ModuleNotFoundError: No module named 'setuptools.command.test'
      [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 update related tools as suggested in this SO post with: pip install --upgrade pip setuptools wheel and installing system packages sudo apt-get install python3-wrapt python3-setuptools to no avail.

However, installing sudo poetry add vcrpy@5.1.0 works without any issue.
Any help to further debug or resolve this issue would be much appreciated! Thank you.

@JSv4
Copy link

JSv4 commented Jul 29, 2024

Crazy. I was literally just opening this same issue. I'm having the same issue. I am not using poetry but am using pip. I see this:

image

What makes my issue extra weird is this whole thing started due to me trying to upgrade opencv. If I install opencv-python==4.7.0.68 and vcrpy==6.0.1, I have no issues. If I install opencv-python 4.10.0.84, bamn, vcr.py won't install and I get this message.

EDIT - I'm install this in a Docker container with 3.10-buster base.

Not sure what's up here.

@ninoseki
Copy link

FYI I had the same issue but I would not say this is vcrpy issue.
It's a setuptools's compatibility issue and it can be fixed by following this comment.

@LewisCowlesMotive
Copy link

So until today, I'd never seen this, and our prior builds said they used 6.0.1

@JSv4
Copy link

JSv4 commented Jul 29, 2024

FYI I had the same issue but I would not say this is vcrpy issue.
It's a setuptools's compatibility issue and it can be fixed by following this comment.

Not sure this would work in my case. I will try it, but opencv locked setuptools to a bizarrely specific version - 52 dot something, not at my PC. The link suggests keeping setuptools under version 72, so I should be good there.

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

Successfully merging a pull request may close this issue.

4 participants