Skip to content

Install stuck after Getting requirements to build wheel #64

Closed

Description

@Sim7b

Describe the bug
Install stuck after "Getting requirements to build wheel"

To Reproduce
Steps to reproduce the behavior:

  1. Windows 11 x64 25H2
  2. run setup.ps1 or .bat with admin or user privs
  3. See error

Screenshots
Image

`ERROR: Exception:
Traceback (most recent call last):
File "C:\Users\simon\rwatermark\WatermarkRemover-AI\python\Lib\site-packages\pip_internal\cli\base_command.py", line 107, in _run_wrapper
status = _inner_run()
^^^^^^^^^^^^
File "C:\Users\simon\rwatermark\WatermarkRemover-AI\python\Lib\site-packages\pip_internal\cli\base_command.py", line 98, in _inner_run
return self.run(options, args)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\simon\rwatermark\WatermarkRemover-AI\python\Lib\site-packages\pip_internal\cli\req_command.py", line 96, in wrapper
return func(self, options, args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\simon\rwatermark\WatermarkRemover-AI\python\Lib\site-packages\pip_internal\commands\install.py", line 392, in run
requirement_set = resolver.resolve(
^^^^^^^^^^^^^^^^^
File "C:\Users\simon\rwatermark\WatermarkRemover-AI\python\Lib\site-packages\pip_internal\resolution\legacy\resolver.py", line 184, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\simon\rwatermark\WatermarkRemover-AI\python\Lib\site-packages\pip_internal\resolution\legacy\resolver.py", line 506, in _resolve_one
dist = self._get_dist_for(req_to_install)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\simon\rwatermark\WatermarkRemover-AI\python\Lib\site-packages\pip_internal\resolution\legacy\resolver.py", line 459, in _get_dist_for
dist = self.preparer.prepare_linked_requirement(req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\simon\rwatermark\WatermarkRemover-AI\python\Lib\site-packages\pip_internal\operations\prepare.py", line 542, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\simon\rwatermark\WatermarkRemover-AI\python\Lib\site-packages\pip_internal\operations\prepare.py", line 657, in _prepare_linked_requirement
dist = _get_prepared_distribution(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\simon\rwatermark\WatermarkRemover-AI\python\Lib\site-packages\pip_internal\operations\prepare.py", line 77, in _get_prepared_distribution
abstract_dist.prepare_distribution_metadata(
File "C:\Users\simon\rwatermark\WatermarkRemover-AI\python\Lib\site-packages\pip_internal\distributions\sdist.py", line 55, in prepare_distribution_metadata
self._install_build_reqs(build_env_installer)
File "C:\Users\simon\rwatermark\WatermarkRemover-AI\python\Lib\site-packages\pip_internal\distributions\sdist.py", line 132, in _install_build_reqs
build_reqs = self._get_build_requires_wheel()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\simon\rwatermark\WatermarkRemover-AI\python\Lib\site-packages\pip_internal\distributions\sdist.py", line 107, in _get_build_requires_wheel
return backend.get_requires_for_build_wheel()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\simon\rwatermark\WatermarkRemover-AI\python\Lib\site-packages\pip_internal\utils\misc.py", line 700, in get_requires_for_build_wheel
return super().get_requires_for_build_wheel(config_settings=cs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\simon\rwatermark\WatermarkRemover-AI\python\Lib\site-packages\pip_vendor\pyproject_hooks_impl.py", line 196, in get_requires_for_build_wheel
return self._call_hook(
^^^^^^^^^^^^^^^^
File "C:\Users\simon\rwatermark\WatermarkRemover-AI\python\Lib\site-packages\pip_vendor\pyproject_hooks_impl.py", line 402, in _call_hook
raise BackendUnavailable(
pip._vendor.pyproject_hooks._impl.BackendUnavailable: Cannot import 'mesonpy'

[X] Failed to install dependencies`

Activity

  1. xCorvoss commented on Mar 1, 2026

    @xCorvoss

    Same error. Any solution yet?

  2. benshep commented on Mar 2, 2026

    @benshep

    I had the same error. I got a bit further by installing the meson-python project manually using pip (python\python.exe -m pip install meson-python), and setting my CC environment variable to point to a gcc.exe I had previously installed. But then I ended up with a different issue: "ERROR: Python dependency not found". I don't know how to resolve this.

    Collecting PyGObject (from -r requirements.txt (line 26))
      Downloading pygobject-3.56.0.tar.gz (1.4 MB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.4/1.4 MB 71.6 MB/s  0:00:00
          [i] Processing 4K video? Get some snacks, it takes a while                         done
      Getting requirements to build wheel ... done
          [?] Tip: Check the logs if something goes wrong                                    done
          [i] The AI can handle semi-transparent watermarks too!                             error
      error: subprocess-exited-with-error
    
      × Preparing metadata (pyproject.toml) did not run successfully.
      │ exit code: 1
      ╰─> [18 lines of output]
          + meson setup C:\Users\bjs54\AppData\Local\Temp\pip-install-xtkoi7_5\pygobject C:\Users\bjs54\AppData\Local\Temp\pip-install-xtkoi7_5\pygobject\.mesonpy-e6kpx894 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md -Dtests=false -Dwheel=true --wrap-mode=nofallback --native-file=C:\Users\bjs54\AppData\Local\Temp\pip-install-xtkoi7_5\pygobject\.mesonpy-e6kpx894\meson-python-native-file.ini
          The Meson build system
          Version: 1.10.1
          Source dir: C:\Users\bjs54\AppData\Local\Temp\pip-install-xtkoi7_5\pygobject
          Build dir: C:\Users\bjs54\AppData\Local\Temp\pip-install-xtkoi7_5\pygobject\.mesonpy-e6kpx894
          Build type: native build
          Project name: pygobject
          Project version: 3.56.0
          C compiler for the host machine: C:\mingw64\bin\gcc.exe (gcc 12.2.0 "gcc.exe (MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders) 12.2.0")
          C linker for the host machine: C:\mingw64\bin\gcc.exe ld.bfd 2.39
          Host machine cpu family: x86_64
          Host machine cpu: x86_64
          Program python3 found: YES (C:\Users\bjs54\GitHub\WatermarkRemover-AI\python\python.exe)
          Run-time dependency python found: NO (tried pkgconfig and sysconfig)
    
          ..\meson.build:28:20: ERROR: Python dependency not found
    
          A full log can be found at C:\Users\bjs54\AppData\Local\Temp\pip-install-xtkoi7_5\pygobject\.mesonpy-e6kpx894\meson-logs\meson-log.txt
          [end of output]
    
  3. brad203tx commented on Mar 3, 2026

    @brad203tx

    I am having the same issue Install fails after "Getting requirements to build wheel" same stack as first

  4. buouyu commented on Mar 10, 2026

    @buouyu

    I have the same problem. Have you solved it?

  5. Sim7b commented on Mar 16, 2026

    @Sim7b
    Author
  6. omrid594 commented on Mar 16, 2026

    @omrid594

    did it work for you?

  7. Sim7b commented on Mar 16, 2026

    @Sim7b
    Author

    Yes but need a fresh install.
    Unfortunately I have another problem when I try to remove watermark...

  8. tjsky commented on Mar 17, 2026

    @tjsky

    Simply remove PyGObject from the requirements.txt file and then rerun the ps1 script, as PyGObject is not needed at all on Windows systems—it's intended for Linux.

    从requirements.txt文件中删除PyGObject,然后重新运行ps1脚本,因为 Windows 系统根本不需要PyGObject——它是给Linux用的

  9. Vitor333104 commented on Apr 8, 2026

    @Vitor333104

    I tested it on my machine and it worked perfectly.

  10. added
    area: installation
    bug
    dependencies
    on Sep 16, 2026
  11. D-Ogi commented on Sep 16, 2026

    @D-Ogi
    Owner

    Keeping this as the main Windows PyGObject installation report; #72 and #75 contain the same build-failure pattern.

    requirements.txt on main still includes PyGObject unconditionally. The logs show failures while building it, including Cannot import 'mesonpy' and a later missing Python development dependency after manually adding build tools. Installing Meson alone is therefore not a complete fix.

    #65 and #68 contain related platform/backend changes. A fix needs a fresh Windows installation test and a working Linux GUI backend; removing backend dependencies indiscriminately would leave another platform broken. This issue stays open until the fix is merged and those installation paths are verified.

  12. D-Ogi commented on Sep 16, 2026

    @D-Ogi
    Owner

    Fixed in #88, with the dependency migration in #89 now also merged. Windows no longer installs PyGObject or uses the legacy resolver. Linux receives the complete Qt backend through its platform-specific requirement and documented system libraries.

    Validation: fresh PowerShell and batch installs completed on Windows (including embedded Python 3.12.7); repeat PowerShell setup succeeded. Full application installation, pip check, and the JavaScript/Python desktop bridge passed on Windows, Linux and macOS. See #88 and #89 for the evidence and limits.

    Please use a fresh checkout/application environment when upgrading an older IOPaint installation: https://github.com/D-Ogi/WatermarkRemover-AI/blob/main/docs/lama-runtime.md#installation-and-migration . Closing the reported PyGObject/Meson installation problem as fixed. A remaining GUI or processing error should be tracked separately with its own traceback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: installationbugdependencies

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions