-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
My attempt to use index_urls for installing a scikit-learn wheel from pypi.anaconda.org #80
Comments
Oh, thanks for the report. For now, what happens when you do
This was done because the only package repository micropip used before was PyPI, and PyPI can't host WASM wheel, but now that it's possible to use a different package repository by changing the index URL, it makes sense to add an option to turn it (lookup pyodide-lock.json first) on/off. Maybe we need to add something like |
OK makes sense. Being able to change the priority order would be great for my use case. My naive expecation would be that if I provide |
Yes, I would agree with that. Can't we make this the default @ryanking13 ? Even if the added index only has non-WASM wheels IMO it should still be the highest priority. So the priority would be,
|
@rth Yes, that sounds more natural to me. It's a bit annoying but it's the behavior users expect. |
Why I want to do this
It would be nice to be able to build a stable and dev wheel for scikit-learn and make it easily installable inside Pyodide. This would allow to control the version of scikit-learn that the user uses, independently of the scikit-learn version provided by the Pyodide distribution.
pypi.anaconda.org seems like a good place since scikit-learn (and other scientific packages) are already using it for some of scikit-learn, for example for hosting nightly scikit-learn wheels see https://anaconda.org/scientific-python-nightly-wheels.
This was mentioned in other places e.g. pyodide/pyodide#3049 (comment).
What I tried
I uploaded a scikit-learn wheel to https://pypi.anaconda.org/lesteve/simple/scikit-learn/
I was hoping to be able to use it with
index_urls
(at the same time I expected CORS issues to come into play) in the Pyodide latest REPL:Looking at my browser console, I was surprised to realise that the scikit-learn wheel is coming from
https://cdn.jsdelivr.net/pyodide/dev/full/
rather than theindex_urls
I specified. In the use case I outlined at the beginning, I would like thatindex_urls
takes precedence over what Pyodide provides.Maybe this is expected since index_urls is only supposed to work with Python wheels and not compiled wheels? Or maybe packages provided by Pyodide have a special status for
micropip
?Full disclosure: I then tried to build locally a Pyodide dist without scikit-learn and indeed in this case
index_urls
is used but (as kind of expected) there is a CORS issue.The text was updated successfully, but these errors were encountered: