Skip to content
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

Unify JupyterLite Install Instructions #5204

Closed
2 tasks
michaelweinold opened this issue Jul 4, 2023 · 1 comment · Fixed by #5243
Closed
2 tasks

Unify JupyterLite Install Instructions #5204

michaelweinold opened this issue Jul 4, 2023 · 1 comment · Fixed by #5243

Comments

@michaelweinold
Copy link

Description

Instructions on installing Panel in a (Pyodide-based) JupyterLite environment are presently both outdated and broken.

There are two different outdated scripts (for Panel versions <1.0.0) at:

If I try to install those into a JupyterLite Pyodide environment, I get:

await micropip.install("https://cdn.holoviz.org/panel/0.14.0/wheels/panel-0.14.0-py3-none-any.whl", keep_going=True)
ValueError: Can't fetch wheel from 'https://cdn.holoviz.org/panel/0.14.0/wheels/panel-0.14.0-py3-none-any.whl'.
One common reason for this is when the server blocks Cross-Origin Resource Sharing (CORS).
Check if the server is sending the correct 'Access-Control-Allow-Origin' header.

On the other hand, if I try to install the Bokeh and Panel py3-none-any wheels directly from pip, I get an error related to python packages that have not yet been compiled for WASM:

micropip.install("https://files.pythonhosted.org/packages/56/98/da78cec88a7c47b761c9b3a18677b5508ef17417184396b3d1361fc811f1/bokeh-3.2.0-py3-none-any.whl", keep_going=True)
File /lib/python3.11/site-packages/micropip/_micropip.py:580, in install(requirements, keep_going, deps, credentials, pre)
    578 if transaction.failed:
    579     failed_requirements = ", ".join([f"'{req}'" for req in transaction.failed])
--> 580     raise ValueError(
    581         f"Can't find a pure Python 3 wheel for: {failed_requirements}\n"
    582         f"See: {FAQ_URLS['cant_find_wheel']}\n"
    583     )
    585 wheel_promises = []
    586 # Install built-in packages

ValueError: Can't find a pure Python 3 wheel for: 'contourpy>=1', 'tornado>=5.1'
See: https://pyodide.org/en/stable/usage/faq.html#micropip-can-t-find-a-pure-python-wheel
micropip.install("https://files.pythonhosted.org/packages/90/a3/cc9cfdf1b18e5456a0ebd9370baa0a5d58501b4904fa3b3d1ecccbdbd1a2/panel-1.1.1-py2.py3-none-any.whl", keep_going=True)
File /lib/python3.11/site-packages/micropip/_micropip.py:580, in install(requirements, keep_going, deps, credentials, pre)
    578 if transaction.failed:
    579     failed_requirements = ", ".join([f"'{req}'" for req in transaction.failed])
--> 580     raise ValueError(
    581         f"Can't find a pure Python 3 wheel for: {failed_requirements}\n"
    582         f"See: {FAQ_URLS['cant_find_wheel']}\n"
    583     )
    585 wheel_promises = []
    586 # Install built-in packages

ValueError: Can't find a pure Python 3 wheel for: 'contourpy>=1', 'tornado>=5.1'
See: https://pyodide.org/en/stable/usage/faq.html#micropip-can-t-find-a-pure-python-wheel

Describe the solution you'd like

A working, unified script pointing to the latest version of Panel and Bokeh.

Describe alternatives you've considered

N/A

Additional context

Try the installation for yourself at https://jupyterlite.readthedocs.io/en/latest/_static/lab/index.html

@michaelweinold
Copy link
Author

As per the discussion at the Holoviz Discourse, the following wheels work just fine:

https://cdn.holoviz.org/panel/1.2.0/dist/wheels/bokeh-3.2.0-py3-none-any.whl
https://cdn.holoviz.org/panel/1.2.0/dist/wheels/panel-1.2.0-py3-none-any.whl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant