-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
micropip.install("<...>")
does not uphold custom PyPI indices
#101
Comments
@agriyakhetarpal Thanks for the report. What happens is, So because of CORS issue, micropip silently fallbacks to |
Right, thanks, @ryanking13 for the extra logs. I did try to download PyWavelets from |
@ryanking13 thanks for the ping! Let me check with the team and will report back. |
Great! Thanks for the help, Fabio!! |
Yes, I can confirm Roman contacted Anaconda before 😉. As a scikit-learn developer who worked on adding interactivity to the scikit-learn documentation and improving Pyodide support for scikit-learn and scipy, I would be super interested to see CORS headers set on anaconda.org, although I can imagine there are complexities involved. This would allow to have more control on the scikit-learn version inside JupyterLite and match the one for the documentation. For example right now if you go to this scikit-learn example the documented scikit-learn version is 1.4.1 but the scikit-learn version inside JupyterLite is 1.3.1 which is what Pyodide 0.25.1 comes with. So this particular example gives confusing errors because it documents new features in 1.4 features and the scikit-learn version inside JupyterLite is 1.3.1. Also Numpy has started to publish Pyodide nightly wheels on anaconda.org see https://anaconda.org/scientific-python-nightly-wheels/numpy/files/ and numpy/numpy#26134. Having CORS headers set on anaconda.org will help a lot making them more conveniently usable, e.g. with |
To add to this, I'm not sure how much work it would require on JupyterLite's end but to make this step automated it would be great to set the index URL (or a list of them if one wants to choose multiple ones) in |
Just to keep folks informed, I haven't dropped the ball here, just going through internal communications |
As a follow-up to the CORS headers on anaconda.org, I posted pyodide/pyodide#3049 (comment) to try to keep the conversation in a single place 😉 |
A description of the issue
Last year, #74 added support for setting a custom index URL that adheres to the PEP-503-based simple repository APIs for the purpose of installing files from an index different from PyPI.
However, I cannot seem to make this work while setting up interactive examples on Read the Docs for the development version of a package, here is a reproducer: PyWavelets/pywt#728
Some steps to reproduce
In the Examples section on the Read the Docs PR preview for a simple API reference, say, here: https://pywavelets--728.org.readthedocs.build/en/728/ref/wavelets.html#wavelet-families
I am trying to run this code snippet inside a code block in the Pyodide-enabled JupyterLite notebook (that can be opened with the "Try it in your browser" button):
and I even tried this:
but
micropip.list()
still prints out (note: truncated output):rather than the version I am trying to install (
1.6.0rc1
at the time of writing), which doesn't make sense – so I tried reloading the package withimportlib.reload()
andimportlib.invalidate_caches()
, but to no avail – it is still1.4.1
. This suggests that themicropip.install()
invocation might be failing silently.Expected behaviour
It would be great to see the development version of PyWavelets getting downloaded and installed (i.e.,
v1.6.0
). For interactive examples usingjupyterlite-pyodide-kernel
, it is not possible to pre-install wheels (unlikexeus-kernel
, where pre-loading wheels is possible throughemscripten-forge
), so we are adding an admonition that displays the command to execute an installation of the wheels for interested users.P.S. A workaround I am considering is to download the WASM wheel by overriding the Read the Docs documentation build process, place it into an appropriate location as listed in https://jupyterlite.readthedocs.io/en/latest/howto/pyodide/wheels.html, and proceed to install from the wheel file from there. However, being a workaround – this has negative implications and is too hacky to use, since it would be expected for the functionality added to just work.
The text was updated successfully, but these errors were encountered: