Skip to content

pip.parse parsing all requirements files fails on platform specific wheel downloads #2622

@keith

Description

@keith

🐞 bug report

Affected Rule

pip_parse

Is this a regression?

Yes, works in 0.40.0 with parse_all_requirements_files = False.

Description

This is a new issue for #2450 since I can't reopen that one.

🔬 Minimal Reproduction

Checkout this branch #2449 on a non linux x86_64 machine, run bazel query 'deps(...)'

🔥 Exception or Error

===== stdout start =====
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cpu
===== stdout end =====
===== stderr start =====
ERROR: Could not find a version that satisfies the requirement torch==2.4.1+cpu (from versions: 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.4.0, 2.4.1, 2.5.0, 2.5.1, 2.6.0, 2.6.0+cpu)
ERROR: No matching distribution found for torch==2.4.1+cpu
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/ubuntu/.cache/bazel/_bazel_ubuntu/46f0c9813505c30d178a2aff399354ea/external/rules_python+/python/private/pypi/whl_installer/wheel_installer.py", line 205, in <module>
    main()
  File "/home/ubuntu/.cache/bazel/_bazel_ubuntu/46f0c9813505c30d178a2aff399354ea/external/rules_python+/python/private/pypi/whl_installer/wheel_installer.py", line 190, in main
    subprocess.run(pip_args, check=True, env=env)
  File "/home/ubuntu/.cache/bazel/_bazel_ubuntu/46f0c9813505c30d178a2aff399354ea/external/rules_python++python+python_3_11_aarch64-unknown-linux-gnu/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/home/ubuntu/.cache/bazel/_bazel_ubuntu/46f0c9813505c30d178a2aff399354ea/external/rules_python++python+python_3_11_host/python', '-m', 'pip', '--isolated', 'download', '--only-binary=:all:', '--no-deps', '--index-url', 'https://pypi.org/simple', '--extra-index-url', 'https://download.pytorch.org/whl/cpu', '-r', '/tmp/tmpaeppdvmq']' returned non-zero exit status 1.
===== stderr end =====

🌍 Your Environment

Operating System: linux aarch64

Output of bazel version: 8.1.0

Rules_python version: f2941df

Metadata

Metadata

Assignees

Labels

type: pippip/pypi integration

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions