pyodide-kernel icon indicating copy to clipboard operation
pyodide-kernel copied to clipboard

Conflicting versions of altair

Open fairdatasystems opened this issue 1 year ago • 8 comments

Description

%pip install -q altair

ValueError: Requested 'typing-extensions>=4.10.0; python_version < "3.13"', but typing-extensions==4.7.1 is already installed

Reproduce

the pip install of altair triggers this warning in my jupyterlite notebooks (that worked fine a few weeks ago!), but it does not trigger in your example notebooks. This happens in Chrome in Windows, and in Chromium in Linux. Also after deleting the IndexedDB for jupyterlite.

???

fairdatasystems avatar Aug 29 '24 12:08 fairdatasystems

Any thoughts on this? I am supposed to do a demo early next week that depends on the notebooks working... and they suddenly stopped!

fairdatasystems avatar Sep 06 '24 08:09 fairdatasystems

@fairdatasystems I just tried on https://jupyterlite-pyodide-kernel.readthedocs.io/en/latest/_static/lab/index.html and it seems to be working:

image

Are you able to check if you are using the latest versions of the jupyterlite-* packages?

jtpio avatar Sep 09 '24 13:09 jtpio

Forgive my ignorance, but... I don't know how I would do that. What file contains that information? (and can it change without me editing it?)

markwilkinson avatar Sep 09 '24 14:09 markwilkinson

I solved the problem by copy/pasting the requirements.txt from the jupyterlite demo site.

Still worrying that something can break without my knowledge...

markwilkinson avatar Sep 09 '24 15:09 markwilkinson

@markwilkinson you can run the following code snippets to check the versions:

import pyodide
pyodide.__version__
import pyodide_kernel
pyodide_kernel.__version__

And click on Help > About to check the JupyterLite version:

image

jtpio avatar Sep 09 '24 15:09 jtpio

The error was likely because Pyodide includes a version of altair already, and you were probably using an old version of Pyodide with an old jupyterlite-pyodide-kernel. Then maybe there was a new release of altair which caused this error?

One way to fix this could be to explicitly pin the version of altair you would like to use in your notebook (in that %pip install altair command).

jtpio avatar Sep 09 '24 15:09 jtpio

Thank you for the advice! Greatly appreciated!

markwilkinson avatar Sep 09 '24 15:09 markwilkinson

The newly-released Pyodide 0.27.0 has updated Altair to version 5.4.1 and typing-extensions to version 4.11.0, if this helps. :)

agriyakhetarpal avatar Jan 09 '25 22:01 agriyakhetarpal