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

pip_install: Bazel version cannot be determined; expected at least 4.0.0? #823

Closed
edcote opened this issue Sep 4, 2022 · 2 comments
Closed

Comments

@edcote
Copy link

edcote commented Sep 4, 2022

Steps to repo:

$ bazelisk --version
bazel 5.2.0
$ bazelisk query --output=build //... 
ERROR: Traceback (most recent call last):
[..]
        File "/home/edc/.cache/bazel/_bazel_edc/47ee53dcfd5ce43eec5559a876596bb8/external/rules_python/python/pip_install/repositories.bzl", line 119, column 19, in pip_install_dependencies
                versions.check("4.0.0")
        File "/home/edc/.cache/bazel/_bazel_edc/47ee53dcfd5ce43eec5559a876596bb8/external/rules_python/third_party/github.com/bazelbuild/bazel-skylib/lib/versions.bzl", line 92, column 17, in _check_bazel_version
                fail("Bazel version cannot be determined; expected at least {}".format(
Error in fail: Bazel version cannot be determined; expected at least 4.0.0
ERROR: error loading package '': Package '' contains errors
Loading: 0 packages loaded

Supporting information:

$ cat BUILD
load("@rules_python//python:pip.bzl", "pip_install")
pip_install()

cat $WORKSPACE
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_python",
    sha256 = "b593d13bb43c94ce94b483c2858e53a9b811f6f10e1e0eedc61073bd90e58d9c",
    strip_prefix = "rules_python-0.12.0",
    url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.12.0.tar.gz",
)

$ cat .bazelversion
5.2.0

Possible culprit is bazelbuild/bazel#8305?

Was this previously fixed or is there workaround I have not seen #526?

@edcote
Copy link
Author

edcote commented Sep 5, 2022

Perhaps pip_install belongs in WORKSPACE?

@edcote edcote closed this as completed Sep 5, 2022
@prclibo
Copy link

prclibo commented Oct 16, 2022

Hello, @edcote
I met similar issue when calling pip_install in a bazel of 5.1.1. Could you possibly share your solution? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants