Package Details: python-mediapipe-git 0.10.18.r137.0cd1f15d5-1

Git Clone URL: https://aur.archlinux.org/python-mediapipe-git.git (read-only, click to copy)
Package Base: python-mediapipe-git
Description: A cross-platform, customizable ML solutions for live and streaming media
Upstream URL: https://github.com/google/mediapipe
Licenses: Apache-2.0
Conflicts: python-mediapipe
Provides: python-mediapipe
Submitter: Premik
Maintainer: Premik (hottea)
Last Packager: hottea
Votes: 1
Popularity: 0.000000
First Submitted: 2021-07-07 23:12 (UTC)
Last Updated: 2024-12-20 03:11 (UTC)

Dependencies (24)

Required by (0)

Sources (2)

Latest Comments

« First ‹ Previous 1 2 3 4 Next › Last »

renyuneyun commented on 2022-01-12 22:27 (UTC)

With a recent update to opencv, this package stops working for me (it's a dependency of fake-background-webcam-git).

It yields error:

  File "/usr/lib/python3.10/site-packages/mediapipe/python/__init__.py", line 17, in <module>
    from mediapipe.python._framework_bindings import resource_util
ImportError: libopencv_core.so.4.5: cannot open shared object file: No such file or directory

Seems this file has been removed from opencv package in the recent update. Now there are only libopencv_core.so.4.5.5, libopencv_core.so.405 and /usr/lib/libopencv_core.so.

How should this be dealt with?

Mr.42 commented on 2021-12-15 13:38 (UTC)

@Premik: Amazing, that works. Thank you very much. I just failed to see that comment... or that there's a page 2. Silly me.

Premik commented on 2021-12-15 13:34 (UTC)

@Mr.42 I think I got some 404 too. But it might be red herring. Try setting java to v11 with archlinux-java. As @nikisalli suggested below. As there is some java module error:

java.lang.reflect.InaccessibleObjectException: Unable to make java.lang.String(byte[],byte) accessible: module java.base does not "opens java.lang" to unnamed module @5e82df6a

Mr.42 commented on 2021-12-15 13:08 (UTC)

I'm not getting this installed, due to a bazel error as well as some 404s. Any ideas?

Starting local Bazel server and connecting to it...
WARNING: ignoring LD_PRELOAD in environment.
INFO: SHA256 (https://github.com/bazelbuild/rules_foreign_cc/archive/0.1.0.zip) = c2cdcf55ffaf49366725639e45dedd449b8c3fe22b54e31625eb80ce3a240f1e
DEBUG: Rule 'rules_foreign_cc' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "c2cdcf55ffaf49366725639e45dedd449b8c3fe22b54e31625eb80ce3a240f1e"
DEBUG: Repository rules_foreign_cc instantiated at:
  /home/pi/.cache/yay/python-mediapipe-git/src/python-mediapipe-git/WORKSPACE:42:13: in <toplevel>
Repository rule http_archive defined at:
  /home/pi/.cache/bazel/_bazel_pi/77eac508c650bd91dfc68065ef5ac145/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
WARNING: Download from http://mirror.tensorflow.org/github.com/bazelbuild/rules_closure/archive/cf1e44edb908e9616030cc83d085989b8e6cd6df.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/tensorflow/runtime/archive/fc70a32ecd248dd7612d75d2177125ed14541367.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/llvm/llvm-project/archive/a87782c34d667d1c1a18fe82a9a7abfc72fd345b.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
DEBUG: /home/pi/.cache/bazel/_bazel_pi/77eac508c650bd91dfc68065ef5ac145/external/org_tensorflow/third_party/repo.bzl:122:14: 
Warning: skipping import of repository 'com_google_absl' because it already exists.
DEBUG: /home/pi/.cache/bazel/_bazel_pi/77eac508c650bd91dfc68065ef5ac145/external/org_tensorflow/third_party/repo.bzl:122:14: 
Warning: skipping import of repository 'com_google_benchmark' because it already exists.
DEBUG: /home/pi/.cache/bazel/_bazel_pi/77eac508c650bd91dfc68065ef5ac145/external/org_tensorflow/third_party/repo.bzl:122:14: 
Warning: skipping import of repository 'pybind11_bazel' because it already exists.
DEBUG: /home/pi/.cache/bazel/_bazel_pi/77eac508c650bd91dfc68065ef5ac145/external/org_tensorflow/third_party/repo.bzl:122:14: 
Warning: skipping import of repository 'com_google_protobuf' because it already exists.
DEBUG: /home/pi/.cache/bazel/_bazel_pi/77eac508c650bd91dfc68065ef5ac145/external/org_tensorflow/third_party/repo.bzl:122:14: 
Warning: skipping import of repository 'com_google_googletest' because it already exists.
DEBUG: /home/pi/.cache/bazel/_bazel_pi/77eac508c650bd91dfc68065ef5ac145/external/org_tensorflow/third_party/repo.bzl:122:14: 
Warning: skipping import of repository 'com_github_gflags_gflags' because it already exists.
DEBUG: /home/pi/.cache/bazel/_bazel_pi/77eac508c650bd91dfc68065ef5ac145/external/org_tensorflow/third_party/repo.bzl:122:14: 
Warning: skipping import of repository 'build_bazel_rules_apple' because it already exists.
DEBUG: /home/pi/.cache/bazel/_bazel_pi/77eac508c650bd91dfc68065ef5ac145/external/org_tensorflow/third_party/repo.bzl:122:14: 
Warning: skipping import of repository 'build_bazel_rules_swift' because it already exists.
DEBUG: /home/pi/.cache/bazel/_bazel_pi/77eac508c650bd91dfc68065ef5ac145/external/org_tensorflow/third_party/repo.bzl:122:14: 
Warning: skipping import of repository 'build_bazel_apple_support' because it already exists.
DEBUG: /home/pi/.cache/bazel/_bazel_pi/77eac508c650bd91dfc68065ef5ac145/external/org_tensorflow/third_party/repo.bzl:122:14: 
Warning: skipping import of repository 'xctestrunner' because it already exists.
DEBUG: /home/pi/.cache/bazel/_bazel_pi/77eac508c650bd91dfc68065ef5ac145/external/org_tensorflow/third_party/repo.bzl:122:14: 
Warning: skipping import of repository 'pybind11' because it already exists.
INFO: SHA256 (https://github.com/bazelbuild/rules_cc/archive/main.zip) = 3839996049629e6377abdfd04681ddeeb0cc3db13b9d2ff81bf46700cb4529f7
DEBUG: Rule 'rules_cc' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "3839996049629e6377abdfd04681ddeeb0cc3db13b9d2ff81bf46700cb4529f7"
DEBUG: Repository rules_cc instantiated at:
  /home/pi/.cache/yay/python-mediapipe-git/src/python-mediapipe-git/WORKSPACE:36:13: in <toplevel>
Repository rule http_archive defined at:
  /home/pi/.cache/bazel/_bazel_pi/77eac508c650bd91dfc68065ef5ac145/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
WARNING: /home/pi/.cache/yay/python-mediapipe-git/src/python-mediapipe-git/mediapipe/framework/BUILD:54:24: in cc_library rule //mediapipe/framework:calculator_cc_proto: target '//mediapipe/framework:calculator_cc_proto' depends on deprecated target '@com_google_protobuf//:cc_wkt_protos': Only for backward compatibility. Do not use.
WARNING: /home/pi/.cache/yay/python-mediapipe-git/src/python-mediapipe-git/mediapipe/framework/tool/BUILD:182:24: in cc_library rule //mediapipe/framework/tool:field_data_cc_proto: target '//mediapipe/framework/tool:field_data_cc_proto' depends on deprecated target '@com_google_protobuf//:cc_wkt_protos': Only for backward compatibility. Do not use.
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/google/XNNPACK/archive/0d6a1194ff36f59c79089336d7a3b446c3c6a39d.zip failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
INFO: Analyzed target //mediapipe/modules/face_detection:face_detection_short_range_cpu (114 packages loaded, 5523 targets configured).
INFO: Found 1 target...
[0 / 14] [Prepa] BazelWorkspaceStatusAction stable-status.txt
FATAL: bazel crashed due to an internal error. Printing stack trace:
java.lang.ExceptionInInitializerError
        at com.google.devtools.build.lib.actions.ParameterFile.writeContent(ParameterFile.java:118)
        at com.google.devtools.build.lib.actions.ParameterFile.writeParameterFile(ParameterFile.java:111)
        at com.google.devtools.build.lib.analysis.actions.ParameterFileWriteAction$ParamFileWriter.writeOutputFile(ParameterFileWriteAction.java:175)
        at com.google.devtools.build.lib.exec.FileWriteStrategy.beginWriteOutputToFile(FileWriteStrategy.java:58)
        at com.google.devtools.build.lib.analysis.actions.AbstractFileWriteAction.beginExecution(AbstractFileWriteAction.java:66)
        at com.google.devtools.build.lib.actions.Action.execute(Action.java:127)
        at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$5.execute(SkyframeActionExecutor.java:855)
        at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$ActionRunner.continueAction(SkyframeActionExecutor.java:1016)
        at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$ActionRunner.run(SkyframeActionExecutor.java:975)
        at com.google.devtools.build.lib.skyframe.ActionExecutionState.runStateMachine(ActionExecutionState.java:129)
        at com.google.devtools.build.lib.skyframe.ActionExecutionState.getResultOrDependOnFuture(ActionExecutionState.java:81)
        at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor.executeAction(SkyframeActionExecutor.java:472)
        at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.checkCacheAndExecuteIfNeeded(ActionExecutionFunction.java:834)
        at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.compute(ActionExecutionFunction.java:307)
        at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:477)
        at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:398)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make java.lang.String(byte[],byte) accessible: module java.base does not "opens java.lang" to unnamed module @5e82df6a
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
        at java.base/java.lang.reflect.Constructor.checkCanSetAccessible(Constructor.java:188)
        at java.base/java.lang.reflect.Constructor.setAccessible(Constructor.java:181)
        at com.google.devtools.build.lib.unsafe.StringUnsafe.<init>(StringUnsafe.java:75)
        at com.google.devtools.build.lib.unsafe.StringUnsafe.initInstance(StringUnsafe.java:56)
        at com.google.devtools.build.lib.unsafe.StringUnsafe.<clinit>(StringUnsafe.java:37)
        ... 19 more
==> ERROR: A failure occurred in package().
    Aborting...

Premik commented on 2021-12-15 09:11 (UTC)

Indeed seems the gcc 11.1.0 buils this now fine. Including the opencv. But I couldn't get the fake-background-webcam working anyway. It just shows the original camera stream on the fake device with no masking at all.

Reg. the copy-error and other strange build errors. Bazel creates ~2G in /tmp/bazel/_bazel_${USER}/ so check you have enough space there.

buzo commented on 2021-12-14 09:26 (UTC) (edited on 2021-12-14 09:27 (UTC) by buzo)

Python 3.10 is now supported, but now the build fails because --link-opencv is not recognized any more. But without this option it fails, too. Does anybody have an idea?

ERROR: /build/python-mediapipe-git/src/python-mediapipe-git/mediapipe/python/BUILD:19:17: Linking mediapipe/python/_framework_bindings.so failed: (Exit 1): gcc-10 failed: error executing command /usr/bin/gcc-10 @bazel-out/k8-opt/bin/mediapipe/python/_framework_bindings.so-2.params

Use --sandbox_debug to see verbose messages from the sandbox
/usr/bin/ld.gold: error: cannot find -lIlmImf
/usr/bin/ld.gold: error: cannot find -lHalf
/usr/bin/ld.gold: error: cannot find -lavresample
collect2: error: ld returned 1 exit status
Target //mediapipe/python:_framework_bindings.so failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 10.577s, Critical Path: 9.01s
INFO: 32 processes: 10 internal, 22 linux-sandbox.
FAILED: Build did NOT complete successfully

buzo commented on 2021-12-13 11:13 (UTC)

I have reported this build failure upstream here.

kescherAUR commented on 2021-12-13 02:17 (UTC) (edited on 2021-12-13 02:17 (UTC) by kescherAUR)

With the recent Python 3.10 update, this package no longer builds. (upstream does not support 3.10 yet)

nikisalli commented on 2021-11-26 10:59 (UTC)

@ngoonee switch to an older java version like java 11