简体   繁体   English

构建和安装媒体管道窗口。 收到错误权限被拒绝:opencv_world3410.dll

[英]Building and installing mediapipe windows. getting error Permission denied: for opencv_world3410.dll

I am using windows 10 OS for building Mediapipe library locally.我正在使用 Windows 10 操作系统在本地构建 Mediapipe 库。 Environment setup:环境设置:

  • python3.10 python3.10
  • windows 10 os视窗 10 操作系统
  • bazel version = 3.7.2巴泽尔版本 = 3.7.2
  • visual studio 2019视觉工作室 2019

Followed the instructions from this link for building using bazel.按照此链接中的说明使用 bazel 进行构建。 with some hick-ups I am able to build the specified hello world from the same above link.通过一些小技巧,我可以从上面的相同链接构建指定的 hello world。

With help of friend I could find building command for hands module.在朋友的帮助下,我可以找到手模块的构建命令。

command1 for building hand_tracking用于构建 hand_tracking 的 command1

bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 --action_env PYTHON_BIN_PATH="C://python_310//python.exe" mediapipe/examples/desktop/hand_tracking:hand_tracking_cpu

command 2 for running same.命令 2 运行相同。

set GLOG_logtostderr=1

.\bazel-bin\mediapipe\examples\desktop\hand_tracking\hand_tracking_cpu --calculator_graph_config_file=.\mediapipe\graphs\hand_tracking\hand_tracking_desktop_live.pbtxt

This is running just like this link: press run button on top right这就像这个链接一样运行:按下右上角的运行按钮

I need this as a library installed in my venv.我需要这个作为安装在我的 venv 中的库。 I dont want the readily available pip install mediapipe.我不想要现成的 pip install mediapipe。 as it is not detecting some hand moments correctly.因为它没有正确检测到一些手的时刻。 If I build my own on my pc, it is detecting.如果我在我的电脑上构建自己的,它正在检测。

I tried this command below,我在下面尝试了这个命令,

(mediapipe_venv) C:\dev\mediapipe_repo\mediapipe>python setup.py install

After building and when I run this setup.py install, it is failing as below.构建之后,当我运行这个 setup.py 安装时,它失败了,如下所示。

Warning: skipping import of repository 'pybind11' because it already exists.
WARNING: C:/dev/mediapipe_repo/mediapipe/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: C:/dev/mediapipe_repo/mediapipe/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.
INFO: Analyzed target //mediapipe/python:_framework_bindings.so (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //mediapipe/python:_framework_bindings.so up-to-date:
  bazel-bin/mediapipe/python/_framework_bindings.so
INFO: Elapsed time: 0.815s, Critical Path: 0.01s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
error: [Errno 13] Permission denied: 'build\\lib.win-amd64-3.10\\mediapipe\\python\\opencv_world3410.dll'

(mediapipe_venv) C:\dev\mediapipe_repo\mediapipe>

Highlighting error from above.从上面突出显示错误。

error: [Errno 13] Permission denied: 'build\lib.win-amd64-3.10\mediapipe\python\opencv_world3410.dll'错误:[Errno 13] 权限被拒绝:'build\lib.win-amd64-3.10\mediapipe\python\opencv_world3410.dll'

Please suggest me if I am following anything wrong.如果我遵循任何错误,请建议我。

I am new to building libs locally.我是本地构建库的新手。 and new for BAZEL.和新的BAZEL。

The command line you're using does not have access to 'build\lib.win-amd64-3.10\mediapipe\python\opencv_world3410.dll'您使用的命令行无权访问“build\lib.win-amd64-3.10\mediapipe\python\opencv_world3410.dll”

Run the same command in a command line with administrative privileges.在具有管理权限的命令行中运行相同的命令。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM