Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error building on windows 11 (maybe docs is out of date?) #5748

Open
stormsc1 opened this issue Nov 21, 2024 · 3 comments
Open

Error building on windows 11 (maybe docs is out of date?) #5748

stormsc1 opened this issue Nov 21, 2024 · 3 comments
Assignees
Labels
os:windows MediaPipe issues on Windows task::all All tasks of MediaPipe type:build/install For Build and Installation issues

Comments

@stormsc1
Copy link

stormsc1 commented Nov 21, 2024

Environment

  • Python 3.9 (tried with 3.6, 3.11, and 3.12)
  • Bazel though Bazelisk
  • BAZEL_VS=C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
  • BAZEL_VC=C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC
  • BAZEL_VC_FULL_VERSION=14.29.30133
  • BAZEL_WINSDK_FULL_VERSION=10.0.19041.0
C:\Users\wow\mediapipe>bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 --action_env PYTHON_BIN_PATH="C:/Users/wow/AppData/Local/Programs/Python/Python39/python.exe" mediapipe/examples/desktop/hello_world
INFO: Repository python_version_repo instantiated at:
  C:/users/wow/mediapipe/WORKSPACE:324:25: in <toplevel>
  C:/users/wow/_bazel_cawthorne/x4bdikh4/external/org_tensorflow/third_party/xla/third_party/py/python_init_repositories.bzl:13:22: in python_init_repositories
Repository rule python_repository defined at:
  C:/users/wow/_bazel_cawthorne/x4bdikh4/external/org_tensorflow/third_party/py/python_repo.bzl:151:36: in <toplevel>
ERROR: An error occurred during the fetch of repository 'python_version_repo':
   Traceback (most recent call last):
        File "C:/users/wow/_bazel_cawthorne/x4bdikh4/external/org_tensorflow/third_party/py/python_repo.bzl", line 12, column 34, in _python_repository_impl
                version = _get_python_version(ctx)
        File "C:/users/wow/_bazel_cawthorne/x4bdikh4/external/org_tensorflow/third_party/py/python_repo.bzl", line 87, column 21, in _get_python_version
                fail("""
Error in fail:
Cannot match hermetic Python version to system Python version.
System Python was not found.
ERROR: C:/users/wow/mediapipe/WORKSPACE:324:25: fetching python_repository rule //external:python_version_repo: Traceback (most recent call last):
        File "C:/users/wow/_bazel_cawthorne/x4bdikh4/external/org_tensorflow/third_party/py/python_repo.bzl", line 12, column 34, in _python_repository_impl
                version = _get_python_version(ctx)
        File "C:/users/wow/_bazel_cawthorne/x4bdikh4/external/org_tensorflow/third_party/py/python_repo.bzl", line 87, column 21, in _get_python_version
                fail("""
Error in fail:
Cannot match hermetic Python version to system Python version.
System Python was not found.
ERROR: Error computing the main repository mapping: no such package '@python_version_repo//':
Cannot match hermetic Python version to system Python version.
System Python was not found.
Loading:

I am aware windows builds are not the norm. I would just build on Linux, if it wasnt because i needed the windows binaries for Unreal Engine project.

@stormsc1 stormsc1 added the type:others issues not falling in bug, perfromance, support, build and install or feature label Nov 21, 2024
@willyweichen
Copy link

Same problem:

Python 3.10.14
BAZEL_VS=C:\Program Files\Microsoft Visual Studio\2022\Community
BAZEL_VC=C:\Program Files\Microsoft Visual Studio\2022\Community\VC
BAZEL_VC_FULL_VERSION=14.42.34433
BAZEL_WINSDK_FULL_VERSION=10.0.22621.3233

C:\Mediapipe\mediapipe-master>bazel build -c opt --define MWDIAPIPE_DISABLE_GPU=0 PYTHON_BIN_PATH="C:\Users\YAO\anaconda3\envs\hamer\python.exe" mediapipe/examples/desktop/hello_world
Starting local Bazel server and connecting to it...
INFO: Repository python_version_repo instantiated at:
C:/mediapipe/mediapipe-master/WORKSPACE:324:25: in
C:/users/yao/_bazel_yao/oieertoi/external/org_tensorflow/third_party/xla/third_party/py/python_init_repositories.bzl:13:22: in python_init_repositories
Repository rule python_repository defined at:
C:/users/yao/_bazel_yao/oieertoi/external/org_tensorflow/third_party/py/python_repo.bzl:151:36: in
ERROR: C:/users/yao/_bazel_yao/oieertoi/external/org_tensorflow/third_party/py/python_repo.bzl:87:21: An error occurred during the fetch of repository 'python_version_repo':
Traceback (most recent call last):
File "C:/users/yao/_bazel_yao/oieertoi/external/org_tensorflow/third_party/py/python_repo.bzl", line 12, column 34, in _python_repository_impl
version = _get_python_version(ctx)
File "C:/users/yao/_bazel_yao/oieertoi/external/org_tensorflow/third_party/py/python_repo.bzl", line 87, column 21, in _get_python_version
fail("""
Error in fail:
Cannot match hermetic Python version to system Python version.
System Python was not found.
ERROR: Error computing the main repository mapping: no such package '@@python_version_repo//':
Cannot match hermetic Python version to system Python version.
System Python was not found.
Computing main repo mapping:

@stormsc1
Copy link
Author

Just tried building the v0.10.18 release. Same error.

@stormsc1
Copy link
Author

stormsc1 commented Nov 21, 2024

I tried building a bunch of versions from releases.

The issue does not appear to be present in v0.10.2, v0.10.10, v0.10.14 v0.10.15 (second latest release). So it must be something in v0.10.18.

@willyweichen If you don't care for the updates in v0.10.18, then v0.10.15 seems to be an option.

@kuaashish kuaashish assigned kuaashish and unassigned ayushgdev Nov 22, 2024
@kuaashish kuaashish added type:build/install For Build and Installation issues os:windows MediaPipe issues on Windows task::all All tasks of MediaPipe and removed type:others issues not falling in bug, perfromance, support, build and install or feature labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os:windows MediaPipe issues on Windows task::all All tasks of MediaPipe type:build/install For Build and Installation issues
Projects
None yet
Development

No branches or pull requests

4 participants