Description
Problem
piplite
supports passing a string or a list of strings of index URLs
but it does not yet provide a CLI flag for them, so it is currently not possible to write commands %pip install numpy --index-urls https://anaconda.org/scientific-python-nightly-wheels/simple
, as extra indices are/will be ignored and NumPy 2.0.2 from the Pyodide distribution is installed instead.
Proposed Solution
Extend https://github.com/jupyterlite/pyodide-kernel/blob/36aedb97d38cf283df8c3b0d65d7d6b8e575f0ab/packages/pyodide-kernel/py/piplite/piplite/cli.py to have a simple --index-urls
option that is passed to piplite.py
, at first. It could be extended to --index-url
or --extra-index-url
options later if and when such a change is brought upstream in micropip
.
Additional context
xref: pyodide/pyodide#4898 (comment), as I've been meaning to test out the rollout of CORS headers for the Anaconda.org PyPI-like index through piplite
, but I found I was unable to do so, while micropip
works.