I'm trying to install tink library to use it on my python scripts on my Windows system.
Python version I'm using: 3.12.10
I have encountered some errors before but I have been solving them:
- I needed protoc; I installed it and added it to PATH
- I needed bazel; I installed it and added it to PATH
- I needed bash; I installed Cywing and added basth to PATH
After that, I keep getting the following error that I don't quite understand when I use "pip install tink":
INFO: Repository local_config_python instantiated at:
C:/temp/pip-install-tolrs06x/tink_587703b11fa04dc4b3364796d840ea99/WORKSPACE:11:18: in <toplevel>
C:/temp/pip-install-tolrs06x/tink_587703b11fa04dc4b3364796d840ea99/tink_py_deps_init.bzl:24:21: in tink_py_deps_init
Repository rule python_configure defined at:
C:/users/0014401/_bazel_0014401/dd6c7pmm/external/pybind11_bazel/python_configure.bzl:414:35: in <toplevel>
ERROR: An error occurred during the fetch of repository 'local_config_python':
Traceback (most recent call last):
File "C:/users/0014401/_bazel_0014401/dd6c7pmm/external/pybind11_bazel/python_configure.bzl", line 411, column 36, in _python_autoconf_impl
_create_local_python_repository(repository_ctx)
File "C:/users/0014401/_bazel_0014401/dd6c7pmm/external/pybind11_bazel/python_configure.bzl", line 360, column 22, in _create_local_python_repository
_check_python_lib(repository_ctx, python_lib)
File "C:/users/0014401/_bazel_0014401/dd6c7pmm/external/pybind11_bazel/python_configure.bzl", line 243, column 14, in _check_python_lib
_fail("Invalid python library path: %s" % python_lib)
File "C:/users/0014401/_bazel_0014401/dd6c7pmm/external/pybind11_bazel/python_configure.bzl", line 29, column 9, in _fail
fail("%sPython Configuration Error:%s %s\n" % (red, no_color, msg))
Error in fail: Python Configuration Error: Invalid python library path: C:\Users\0014401\AppData\Local\Programs\Python\Python312
ERROR: C:/temp/pip-install-tolrs06x/tink_587703b11fa04dc4b3364796d840ea99/WORKSPACE:11:18: fetching python_configure rule //external:local_config_python: Traceback (most recent call last):
File "C:/users/0014401/_bazel_0014401/dd6c7pmm/external/pybind11_bazel/python_configure.bzl", line 411, column 36, in _python_autoconf_impl
_create_local_python_repository(repository_ctx)
File "C:/users/0014401/_bazel_0014401/dd6c7pmm/external/pybind11_bazel/python_configure.bzl", line 360, column 22, in _create_local_python_repository
_check_python_lib(repository_ctx, python_lib)
File "C:/users/0014401/_bazel_0014401/dd6c7pmm/external/pybind11_bazel/python_configure.bzl", line 243, column 14, in _check_python_lib
_fail("Invalid python library path: %s" % python_lib)
File "C:/users/0014401/_bazel_0014401/dd6c7pmm/external/pybind11_bazel/python_configure.bzl", line 29, column 9, in _fail
fail("%sPython Configuration Error:%s %s\n" % (red, no_color, msg))
Error in fail: Python Configuration Error: Invalid python library path: C:\Users\0014401\AppData\Local\Programs\Python\Python312
ERROR: no such package '@@local_config_python//': Python Configuration Error: Invalid python library path: C:\Users\0014401\AppData\Local\Programs\Python\Python312
ERROR: C:/temp/pip-install-tolrs06x/tink_587703b11fa04dc4b3364796d840ea99/tink/cc/pybind/BUILD.bazel:264:17: //tink/cc/pybind:tink_bindings.so depends on @@local_config_python//:python_headers in repository @@local_config_python which failed to fetch. no such package '@@local_config_python//': Python Configuration Error: Invalid python library path: C:\Users\0014401\AppData\Local\Programs\Python\Python312
ERROR: Analysis of target '//tink/cc/pybind:tink_bindings' failed; build aborted: Analysis failed
Analyzing: target //tink/cc/pybind:tink_bindings (91 packages loaded, 907 targets configured)
[1 / 1] checking cached actions
INFO: Elapsed time: 88.382s, Critical Path: 0.13s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
FAILED:
error: command 'C:\\Users\\0014401\\Downloads\\Bazel\\bazel.exe' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for tink
Failed to build tink
ERROR: Could not build wheels for tink, which is required to install pyproject.toml-based projects
WARNING: Failed to remove contents in a temporary directory 'C:\Temp\pip-install-tolrs06x\tink_587703b11fa04dc4b3364796d840ea99'.
You can safely remove it manually.
WARNING: Failed to remove contents in a temporary directory 'C:\Temp\pip-install-tolrs06x'.
You can safely remove it manually.
I believe it has something to do with python path, but I'm not sure. I have checked and my python is correctly set on PATH. I also set variables "BAZEL_PYTHON" and "PYTHON_BIN_PATH".
I don't know whath else to try. I hope you can help.
Thanks and regards.