mediapipe
mediapipe copied to clipboard
'テ「ツツ廬NIT_CWD' is not recognized as an internal or external command, operable program or batch file.
OS Platform and Distribution
Windows 11
Compiler version
MSVC2022
Programming Language and version
C++, Python 3.12.3
Installed using virtualenv? pip? Conda?(if python)
No
MediaPipe version
0.10.14
Bazel version
6.1.1
XCode and Tulsi versions (if iOS)
No response
Android SDK and NDK versions (if android)
No response
Android AAR (if android)
None
OpenCV version (if running on desktop)
3.4.10
Describe the problem
Hello World run fail (possible locale issue?)
Complete Logs
After following the installation instructions for Windows, running
bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 --action_env PYTHON_BIN_PATH="<path_to_python312>//python.exe" mediapipe/examples/desktop/hello_world
fails with the following log:
INFO: Repository npm instantiated at:
C:/code/mediapipe/WORKSPACE:594:13: in <toplevel>
C:/users/godoa/_bazel_godoa/mvh33bjd/external/build_bazel_rules_nodejs/index.bzl:83:18: in yarn_install
Repository rule yarn_install defined at:
C:/users/godoa/_bazel_godoa/mvh33bjd/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl:1002:31: in <toplevel>
ERROR: An error occurred during the fetch of repository 'npm':
Traceback (most recent call last):
File "C:/users/godoa/_bazel_godoa/mvh33bjd/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl", line 993, column 13, in _yarn_install_impl
fail("yarn_install failed: %s (%s)" % (result.stdout, result.stderr))
Error in fail: yarn_install failed: ('"YARN_IGNORE_PATH="' is not recognized as an internal or external command,
operable program or batch file.
'テ「ツツ廬NIT_CWD' is not recognized as an internal or external command,
operable program or batch file.
)
ERROR: C:/code/mediapipe/WORKSPACE:594:13: fetching yarn_install rule //external:npm: Traceback (most recent call last):
File "C:/users/godoa/_bazel_godoa/mvh33bjd/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl", line 993, column 13, in _yarn_install_impl
fail("yarn_install failed: %s (%s)" % (result.stdout, result.stderr))
Error in fail: yarn_install failed: ('"YARN_IGNORE_PATH="' is not recognized as an internal or external command,
operable program or batch file.
'テ「ツツ廬NIT_CWD' is not recognized as an internal or external command,
operable program or batch file.
)
ERROR: C:/code/mediapipe/mediapipe/examples/desktop/hello_world/BUILD:19:10: //mediapipe/examples/desktop/hello_world:hello_world depends on //mediapipe/framework:calculator_graph in repository @ which failed to fetch. no such package '@npm//@bazel/typescript': yarn_install failed: ('"YARN_IGNORE_PATH="' is not recognized as an internal or external command,
operable program or batch file.
'テ「ツツ廬NIT_CWD' is not recognized as an internal or external command,
operable program or batch file.
)
ERROR: Analysis of target '//mediapipe/examples/desktop/hello_world:hello_world' failed; build aborted: Analysis failed
INFO: Elapsed time: 31.601s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (4 packages loaded, 1 target configured)
currently loading: mediapipe/framework ... (2 packages)
Fetching repository @com_google_protobuf; starting
Fetching C:/users/godoa/_bazel_godoa/mvh33bjd/external/com_google_protobuf; Extracting v3.19.1.tar.gz
The common part in the error messages seems to be "'テ「ツツ廬NIT_CWD' is not recognized as an internal or external command,".
Could this error be caused by a locale issue? Any assistance is welcome.
I also encountered the same error. In my environment, I found some multibyte characters in C:/Users/<username>/_bazel_<username>/<some>/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl
I guess that the full-width double quotations might cause the "テ「ツツ廬NIT_CWD' is not recognized" error.
But I have no idea why this happens and whether the characters are a fundamental cause because the npm_install.bzl file seems to be downloaded when the build.
@Ndgt nice catch, line 50 and line 51 definitely use unusual quotations. Did you have a chance to try what happens if you change those to the usual " quotations?
Yes, I rebuilt after changing to the usual " quotations and encountered the following error.
C:/users/<username>/_bazel_<username>/<some>/external/com_github_gflags_gflags/BUILD:16:30: Executing genrule @com_github_gflags_gflags//:gflags_declare_h failed: (Exit -1): bin failed: error executing command (from target @com_github_gflags_gflags//:gflags_declare_h) C:\msys64\usr\bin -c ... (remaining 1 argument skipped)
Action failed to execute: java.io.IOException: ERROR: src/main/native/windows/process.cc(202): CreateProcessW("C:\msys64\usr\bin" -c "source external/bazel_tools/tools/genrule/genrule-setup.sh; awk '{ gsub(/@GFLAGS_NAMESPACE@/, \"gflags\"); gsub(/@(HAVE_STDINT_H|HAVE_SYS_TYPES_H|HAVE_INTTYPES_H|GFLAGS_INTTYPES_FORMAT_C99)@/, \"1\"); gsub(/@([A-Z0-9_]+)@/, \"0\"); print; }' external/com_github_gflags_gflags/src/gflags_declare.h.in > bazel-out/x64_windows-opt/bin/external/com_github_gflags_gflags/gflags_declare.h"): Access is denied.
I think it is necessary to run bazel clean --expunge to remove the entire output base tree and rebuild, so simply modifying the quotation might not make much sense.
Hello @Ndgt ! I have exactly same error. Were you able to resolve this? How did you fix it?
Hello @daehwankim112 I still have not find the way the resolve this problem... I checked folder permissions and antivirus, and also ran as administrator, but the error won't be solved.
Hello @Ndgt. I figured it out. I did 2 things. I am not sure which one helped.
I had environment variable BAZEL_SH with value C:\msys64\usr\bin. I changed the value to be C:\msys64\usr\bin\bash.exe and now it is working.
I changed the folder permission of C:\msys64\usr\bin for a user to have full control. Right click bin folder to open properties. Go to security tab. Edit to have a user to have full control of the folder.
Let me know if this does not fix your issue. If my solution did not work for you, I suggest you to start with Bazel hello world from Bazel. If that does work, they come back to mediapipe hello world example. Good luck!
Hello @daehwankim112. Sorry for the delayed reply.
The build was successful after fixing the quotation issue and changing the environment variables as you suggested!
Here are the commands I executed.
// clean up
bazel clean --expunge
// build
bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 --action_env PYTHON_BIN_PATH="C:\\Users\\<user name>\\AppData\\Local\\Programs\\Python\\Python311\\python.exe" mediapipe/examples/desktop/hello_world
// fix quoations....
// run
bazel run --define MEDIAPIPE_DISABLE_GPU=1 mediapipe/examples/desktop/hello_world:hello_world
Thank you so much!
Hi @Godoakos,
Could you please provide an update on this issue? Based on the ongoing thread, it seems like the issue has been resolved. If that is the case, can we proceed to mark it as resolved and close the status?
Thank you!!
This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.
This issue was closed due to lack of activity after being marked stale for past 7 days.