Skip to content
This repository was archived by the owner on Mar 6, 2025. It is now read-only.
This repository was archived by the owner on Mar 6, 2025. It is now read-only.

pip_install(["--platform linux_x86_64"] running pip wheel and result in no such option: --platform linux_x86_64 #68

Closed
@kchodnicki

Description

@kchodnicki

I have the identical issue as explained here: bazel-contrib/rules_python#260 (comment) and I'm trying to implement the suggestion from here: bazel-contrib/rules_python#260 (comment).

My WORKSPACE:

## PIP install libs for python
http_archive(
    name = "com_github_ali5h_rules_pip",
    strip_prefix = "rules_pip-3.0.0",
    sha256 = "630a7cab43a87927353efca116d20201df88fb443962bf01c7383245c7f3a623",
    urls = ["https://github.com/ali5h/rules_pip/archive/3.0.0.tar.gz"],
)

load("@com_github_ali5h_rules_pip//:defs.bzl", "pip_import")

pip_import(
    name = "pip_deps",
    requirements = "//third_party/python_requirements:requirements.txt",
    python_interpreter="python3",
)

load("@pip_deps//:requirements.bzl", "pip_install")
pip_install(["--platform linux_x86_64", "--only-binary", ":all"])

Unfortunately, I get the following error:

INFO: Repository pypi__39__grpcio_1_37_1 instantiated at:
  /.../WORKSPACE:98:12: in <toplevel>
  /private/var/tmp/.../e3523c944af0bdd86cccbc59a8209df1/external/pip_deps/requirements.bzl:85:16: in pip_install
Repository rule whl_library defined at:
  /private/var/tmp/.../e3523c944af0bdd86cccbc59a8209df1/external/com_github_ali5h_rules_pip/defs.bzl:126:30: in <toplevel>
ERROR: An error occurred during the fetch of repository 'pypi__39__grpcio_1_37_1':
   Traceback (most recent call last):
	File "/private/var/tmp/.../e3523c944af0bdd86cccbc59a8209df1/external/com_github_ali5h_rules_pip/defs.bzl", line 124, column 13, in _whl_impl
		fail("whl_library failed: %s (%s)" % (result.stdout, result.stderr))
Error in fail: whl_library failed:  (
Usage:
  whl.py install [options] <requirement specifier> [package-index-options] ...
  whl.py install [options] -r <requirements file> [package-index-options] ...
  whl.py install [options] [-e] <vcs project url> ...
  whl.py install [options] [-e] <local project path> ...
  whl.py install [options] <archive url/path> ...

no such option: --platform linux_x86_64
)

I'm confused why the argument is being passed (as it seems) to pip wheel and not only pip install.

How should I solve this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions