




















@renyuneyun You need to build it in a clean chroot as described here. This PKGBUILD will download a bazel 7.0.0 binary release and build the pkg with bazel 7.0.0. Other newer bazel release did not work.
I also got errors related to bazel. First I got error saying bazel not found, so I installed bazel to system (v7.2.0, in extra repo). Then, during building, I got this error for bazel:
Invoking: bazel build --compilation_mode=opt --action_env=PYTHON_BIN_PATH=/usr/bin/python //mediapipe/tasks/metadata:image_segmenter_metadata_schema_py --copt=-DTFLITE_GPU_EXTRA_GLES_DEPS --copt=-DMEDIAPIPE_OMIT_EGL_WINDOW_BIT --copt=-DMESA_EGL_NO_X11_HEADERS --copt=-DEGL_NO_X11
ERROR: The project you're trying to build requires Bazel 7.0.0 (specified in /home/ryey/.cache/yay/python-mediapipe/src/mediapipe-0.10.14/.bazelversion), but it wasn't found in /usr/bin.
Bazel binaries for all official releases can be downloaded from here:
https://github.com/bazelbuild/bazel/releases
Please put the downloaded Bazel binary into this location:
/usr/bin/bazel-7.0.0-linux-x86_64
Command '['bazel', 'build', '--compilation_mode=opt', '--action_env=PYTHON_BIN_PATH=/usr/bin/python', '//mediapipe/tasks/metadata:image_segmenter_metadata_schema_py', '--copt=-DTFLITE_GPU_EXTRA_GLES_DEPS', '--copt=-DMEDIAPIPE_OMIT_EGL_WINDOW_BIT', '--copt=-DMESA_EGL_NO_X11_HEADERS', '--copt=-DEGL_NO_X11']' returned non-zero exit status 1.
ERROR Backend subprocess exited when trying to invoke build_wheel
I don't understand why bazel v7.2.0 is not expected to be compatible with v7.0.0, but that is what this indicates.
@krevedko It seems like a network error. You failed to download some files? Just clean your bazel cache and rebuild. Also, try building this pkg in a clean chroot with command: extra-x86_64-build, see also this wiki.
$ yay -S python-mediapipe
...
bazel-bin/mediapipe/tasks/metadata/schema_py_generated.py
INFO: Elapsed time: 0.147s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
running build_modules
downloading file: mediapipe/modules/face_detection/face_detection_full_range_sparse.tflite
Invoking: bazel build mediapipe/modules/face_detection/face_detection_full_range_sparse.tflite
WARNING: Build options --action_env, --compilation_mode, and --copt have changed, discarding analysis cache (this can be expensive, see https://bazel.build/advanced/performance/iteration-speed).
INFO: Analyzed target //mediapipe/modules/face_detection:face_detection_full_range_sparse.tflite (8 packages loaded, 14 targets configured).
ERROR: /var/user/projects/repo/python-mediapipe-git/src/python-mediapipe-git/mediapipe/modules/face_detection/BUILD:173:16: declared output 'mediapipe/modules/face_detection/face_detection_full_range_sparse.tflite' is a dangling symbolic link
ERROR: /var/user/projects/repo/python-mediapipe-git/src/python-mediapipe-git/mediapipe/modules/face_detection/BUILD:173:16: Executing genrule //mediapipe/modules/face_detection:com_google_mediapipe_face_detection_full_range_sparse_tflite_ln failed: not all outputs were created or valid
Target //mediapipe/modules/face_detection:face_detection_full_range_sparse.tflite failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.164s, Critical Path: 0.01s
INFO: 2 processes: 1 internal, 1 linux-sandbox.
ERROR: Build did NOT complete successfully
Command '['bazel', 'build', 'mediapipe/modules/face_detection/face_detection_full_range_sparse.tflite']' returned non-zero exit status 1.
ERROR Backend subprocess exited when trying to invoke build_wheel
src/mediapipe-0.10.14/bazel-bin/mediapipe/modules/face_detection/face_detection_full_range_sparse.tflite points to /tmp/bazel-source-roots/1/file/downloaded.
Is it possible to fix such ...?
Hi @hottea, I uploaded your edits and set you as co-maintainer.
@yochananmarqos, done you can find python-mediapipe-bin with your suggested edits
@robertfoster: Please resubmit as python-mediapipe-bin. Use Installer & Wheel instead of Pip:
makedepends=('python-installer' 'python-wheel')
package() {
python -m installer --destdir="$pkgdir" *.whl
}
pip should not be used to install Python packages in PKGBUILDs.
Also this should be built from source, or the package should be renamed and resubmitted as python-mediapipe-bin.
Version 10 is still broken:
==> Starting package()...
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
ERROR: mediapipe-0.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl is not a supported wheel on this platform.
==> ERROR: A failure occurred in package().
Aborting...
-> error making: python-mediapipe-exit status 4 -> Failed to install the following packages. Manual intervention is required: python-mediapipe - exit status 4
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。
@robertfoster: I just noticed the following after flagging the package out of date:
While 0.10.26 is the latest GitHub tag, it turns out they've only published 0.10.21 on PyPI.